Script Expressions and Strict Comparisons
Posted by ben.bunk on October 15, 2011 at 10:39pm
When working with a script expression, strict comparisons might not work exactly like you would expect. For example, when strictly comparing for a TRUE value this will likely fail:
<?php
%input === TRUE
?>Here is an example where I stumbled onto this:
<?php
function _multifactor_validate_pin($pin = NULL) {
return TRUE;
}
$script->addSet('success', '^_multifactor_validate_pin(%pin)');
$script->addGotoIf('success_message', '^%success === TRUE');
?>