Bug #20103
closed
if.negate dosn't work with if.directReturn
Added by Ole Fritz over 15 years ago.
Updated about 6 years ago.
Description
It's about the typoscript function "if".
If you use the function "if" in combination with "directReturn" and "negate" the value of "directReturn" will never ever be negated.
(issue imported from #M10564)
Resolved, won't fix.
It's true that .negate doesn't affect .directReturn, but there are some reasons not to change this behaviour:
- It might break backwards compatibility, and bugs in "if" tend to be hard to find
- .directReturn is something like an "early return" that short-circuit the rest of the processing
- I can hardly think of any use-case where .directReturn together with .negate would be usefull
- The documentation of .negate states that it negates the above result (not including directReturn), and directReturn states it returns the value directly. Why should we complicate things here even more?
Please reopen this if you still think this issue needs to be fixed. Please provide a good use-case where this cannot be solved otherwise and think about how not to break existing setups.
- Status changed from Resolved to Closed
Also available in: Atom
PDF