allow null value in fragment handler
This commit is contained in:
parent
2f8d4ad80c
commit
c29958f82f
@ -82,8 +82,8 @@ abstract class RoutableFragmentRenderer implements FragmentRendererInterface
|
|||||||
foreach ($values as $key => $value) {
|
foreach ($values as $key => $value) {
|
||||||
if (is_array($value)) {
|
if (is_array($value)) {
|
||||||
$this->checkNonScalar($value);
|
$this->checkNonScalar($value);
|
||||||
} elseif (!is_scalar($value)) {
|
} elseif (!is_scalar($value) && null !== $value) {
|
||||||
throw new \LogicException(sprintf('Controller attributes cannot contain non-scalar values (value for key "%s" is not a scalar).', $key));
|
throw new \LogicException(sprintf('Controller attributes cannot contain non-scalar/non-null values (value for key "%s" is not a scalar or null).', $key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user