In a template I was working on recently, I started to get PHP Notices about undefined constants FALSEOR and FALFALSEORFALSE:
A PHP Error was encountered
Severity: Notice
Message: Use of undefined constant FALSEOR - assumed 'FALSEOR'
Filename: libraries/Functions.php(683) : eval()'d code
Line Number: 205
[and]
A PHP Error was encountered
Severity: Notice
Message: Use of undefined constant FALFALSEEORFALSE - assumed 'FALFALSEEORFALSE'
Filename: libraries/Functions.php(683) : eval()'d code
Line Number: 260
The template code that generated these messages was:
{if STYLE}
<tr>
<td>Style</td>
<td>{STYLE}</td>
</tr>
{/if}
{if YEARBUILT}
<tr>
<td>Year Built</td>
<td>{YEARBUILT} {if YEARBUILTSRC}({YEARBUILTSRC}){/if}</td>
</tr>
{/if}
The variable names in all caps are variables provided by a plug-in. It is possible that they may have empty values, but I haven't been able to produce a case where any would be undefined [in the array consumed by TMPL->parse_variables() in the plugin].
I'm stumped as to why they're being parsed as PHP constants... And even so, I don't see where the strings 'FALSEOR' or 'FALFALSEORFALSE' are being created. Those strings don't appear anywhere in the EE source [that I can find], and none of the template variables are so named.
Should I report this as a bug? Has anybody seen something like this before?
{if STYLE != ''}
instead of just{if STYLE}
. Whilst I believe that both should be valid, I have experienced this same problem. Simply adding!= ''
solved it for me. Let me know if this helps.