- Affected version
- 2.0.12
Unexpected ternary vs && operation behavior between templates and php
This returns 3 in php;
This returns false in templates;
This returns true in templates;
This returns 3 in php;
PHP:
false && true ? 2 : 3;
true && false ? 2 : 3;
This returns false in templates;
PHP:
{{ dump(false && true ? 2 : 3) }}
This returns true in templates;
PHP:
{{ dump(true && false ? 2 : 3) }}