You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you render empty template files for example through TYPO3\CMS\Fluid\View\StandaloneView you get null as the return. This is kind of unexpected as the documentation of TYPO3Fluid\Fluid\View\AbstractTemplateView::render() has a return of type string. Furthermore if you do not expect this and try to cache the output in TYPO3\CMS\Core\Cache\Frontend\StringFrontend it will never be cached, as null can not be cached by it.
Especially because of the documentation and the interaction with the cache, I would consider this a bug.
The text was updated successfully, but these errors were encountered:
Agreed, but I think the right solution is to correct the return type annotation to string|null - it is nice to be able to tell if the template truly didn't cause any output at all, versus if it did render a template but the result was an empty string. Among other things this is used in f:render to determine if the default/fallback representation should be returned if for example a non-existing partial or section was rendered but optional=true was requested.
If you render empty template files for example through
TYPO3\CMS\Fluid\View\StandaloneView
you getnull
as the return. This is kind of unexpected as the documentation ofTYPO3Fluid\Fluid\View\AbstractTemplateView::render()
has a return of typestring
. Furthermore if you do not expect this and try to cache the output inTYPO3\CMS\Core\Cache\Frontend\StringFrontend
it will never be cached, asnull
can not be cached by it.Especially because of the documentation and the interaction with the cache, I would consider this a bug.
The text was updated successfully, but these errors were encountered: