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
Both blocks of both examples are being rendered! That's broken.
THEN_1 is correct. ELSE_2 isn't though!
It's two problems I reckon:
For uncached calls: TryViewHelper->render() calls renderChildren() instead of renderThenChild(), so both blocks are being rendered.
For cached calls: TryViewHelper::renderStatic() tries to access $arguments['__then']() without "isset" beforehand (which triggers an Exception due to a PHP 8 warning, which will then render the "else part".
Additional context
PHP 8.1
TYPO3 11.5
EXT:vhs 7.1.0
The text was updated successfully, but these errors were encountered:
I have checked that the bug exists in the
dev-development
branchYes
I have checked that there are no already open issues or recently closed issues about this bug
Yes
Describe the bug
The viewhelper
v:try
behaves differently when cached than when uncached.The docs on this viewhelper indicates that
f:then
is optional, but it seems to me like it's not.To Reproduce
Expected behavior
Always:
Actual behavior
THEN_1 ELSE_1 THEN_2 ELSE_2
THEN_1 ELSE_2
THEN_1
is correct.ELSE_2
isn't though!It's two problems I reckon:
TryViewHelper->render()
callsrenderChildren()
instead ofrenderThenChild()
, so both blocks are being rendered.TryViewHelper::renderStatic()
tries to access$arguments['__then']()
without "isset" beforehand (which triggers an Exception due to a PHP 8 warning, which will then render the "else part".Additional context
The text was updated successfully, but these errors were encountered: