Skip to content

Commit

Permalink
Merge pull request neos#3969 from kitsunet/bugfix/avoid-type-error-wi…
Browse files Browse the repository at this point in the history
…th-null-content

BUGFIX: Fix NULL content type error in ContentElementWrappingService
  • Loading branch information
kdambekalns committed Dec 1, 2022
2 parents c23a08f + 6b6cfd3 commit 3d2ddf4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ class ContentElementWrappingImplementation extends AbstractFusionObject
*
* @return string
*/
public function getValue()
public function getValue(): string
{
return $this->fusionValue('value');
return (string)$this->fusionValue('value');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected function handle($fusionPath, \Exception $exception, $referenceCode)
{
$handler = new ContextDependentHandler();
$handler->setRuntime($this->runtime);
$output = $handler->handleRenderingException($fusionPath, $exception);
$output = (string)$handler->handleRenderingException($fusionPath, $exception);

$currentContext = $this->getRuntime()->getCurrentContext();
if (isset($currentContext['node'])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ public function render(): string
$currentContext = $fusionObject->getRuntime()->getCurrentContext();

$node = $this->arguments['node'] ?? $currentContext['node'];
return $this->contentElementWrappingService->wrapContentObject($node, $this->renderChildren(), $fusionObject->getPath());
return $this->contentElementWrappingService->wrapContentObject($node, (string)$this->renderChildren(), $fusionObject->getPath());
}
}

0 comments on commit 3d2ddf4

Please sign in to comment.