Bug Templates: "if" conditions in some cases not translated correctly into PHP

There is a bug in this version
N

nocte

Guest
If you have this if condition in a template:

HTML:

Code:
<xf:if is="(!(FALSE OR TRUE OR TRUE))">
FTT.
</xf:if>

then the compiled PHP code looks like this:

PHP:

Code:
    if (!(false OR true) OR true) {
        $__finalCompiled .= '
FTT.
';

It would be expected that nothing was printed, but because of falsely set brackets (!(false OR true), the outcome is different.

Origin: Conditional Statements for XenForo 2

Continue reading...