Currently when you create new view mode - the parameters are passed as object, so Zend\Expressive\Template\DefaultParamsTrait
private function mergeParams($template, array $params)
return array_replace_recursive($globalDefaults, $templateDefaults, $params);
Currently when you create new view mode - the parameters are passed as object, so Zend\Expressive\Template\DefaultParamsTrait private function mergeParams($template, array $params) return array_replace_recursive($globalDefaults, $templateDefaults, $params);
returns NULL, which breaks the script.