Fluid
Fluid copied to clipboard
f:if viewhelper condition evaluates string with (only) two double quotes as null/empty
Let's say we have a PHP variable like this: $test = '""'
Then we pass this variable to a fluid template and check for it like this:
<f:if condition="{test}">value: {test}</f:if>
Result: nothing is printed.
This is (at best) non-intuitive, I'd rather see it as a bug. If a string with length 2 and containing 2 printable characters is considered null/empty, then that seems wrong. Or am I missing something?
This sounds like a bug. Hardcoded strings will be stripped of quotes but it sounds like it also happens for variables which it probably shouldn't.
todo: add test