Bug #94125 ยป RenderViewHelper.php.issue-94125.patch
RenderViewHelper.php 2021-05-12 14:33:06.353428514 +0200 | ||
---|---|---|
} elseif (!$optional) {
|
||
throw new \InvalidArgumentException('ViewHelper f:render called without either argument section, partial, renderable or delegate and optional flag is false');
|
||
}
|
||
if($delegate === null) {
|
||
if (!empty($arguments['contentAs'])) {
|
||
$renderingContext->getVariableProvider()->add($arguments['contentAs'], $content);
|
||
if (($content = $renderChildrenClosure()) !== null) {
|
||
$renderingContext->getVariableProvider()->remove($arguments['contentAs']);
|
||
}
|
||
}
|
||
}
|
||
// Replace empty content with default value. If default is
|
||
// not set, NULL is returned and cast to a new, empty string
|
||
// outside of this ViewHelper.
|
||
if ($content === '') {
|
||
$content = $arguments['default'] ?: $tagContent;
|
||
}
|
||
return $content;
|
||
}
|
||
}
|