#91174if-viewhelper condition 0="text"
Description
The following condition seems to evaluate wrongly:
<f:debug>Result from condition '0 == "text"': {f:if(condition: '0 == "text"', then: 1, else: 0)}</f:debug>
The result is:
Result from condition '0 == "text"': 1
This might be hard to debug in case the test is against a variable that is of type integer or string:
{f:if(condition: '{test} == "text"',
When type casting it works as expected:
{f:if(condition: '{test as string} == "text"',
If in the above example test=1 then the condition doesn’t pass. Without type casting it passes.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.