Skip to content

Commit

Permalink
4622 - Catch view render results of unsupported type
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard Schmitt committed Oct 30, 2023
1 parent 08841c1 commit 1e49246
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ protected function renderContent(ControllerContext $controllerContext): string|R
$view->assign('value', $this->node);
$view->setRenderingEntryPoint($this->nodeDomAddress->getFusionPathForContentRendering());

return $view->render();
$result = $view->render();

return (is_string($result) || $result instanceof ResponseInterface)
? $result
: '';
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,11 @@ protected function renderContent(ControllerContext $controllerContext): string|R
$view->assign('value', $parentNode);
$view->setRenderingEntryPoint($parentDomAddress->getFusionPath());

return $view->render();
$result = $view->render();

return (is_string($result) || $result instanceof ResponseInterface)
? $result
: '';
}
}

Expand Down

0 comments on commit 1e49246

Please sign in to comment.