Skip to content

Commit 22e403d

Browse files
committed
BUGFIX: Custom error view: skip 'viewOptions' that are 'null'
1 parent 3700654 commit 22e403d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Neos.Flow/Classes/Error/AbstractExceptionHandler.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,11 @@ protected function buildView(\Throwable $exception, array $renderingOptions): Vi
156156

157157
$statusMessage = ResponseInformationHelper::getStatusMessageByCode($statusCode);
158158
$viewClassName = $renderingOptions['viewClassName'];
159+
$viewOptions = array_filter($renderingOptions['viewOptions'], static function ($optionValue) {
160+
return $optionValue !== null;
161+
});
159162
/** @var ViewInterface $view */
160-
$view = $viewClassName::createWithOptions($renderingOptions['viewOptions']);
163+
$view = $viewClassName::createWithOptions($viewOptions);
161164
$view = $this->applyLegacyViewOptions($view, $renderingOptions);
162165

163166
$httpRequest = ServerRequest::fromGlobals();

0 commit comments

Comments
 (0)