Las condiciones no funcionan correctamente, si es que no estan dentro de parentesis ().

Se encapsulo en parentesis toda condicion dada que contenga un operador logico.
This commit is contained in:
marcelo.cuiza
2015-02-20 13:10:58 -04:00
parent e23d456ad6
commit 605c22c101
2 changed files with 4 additions and 5 deletions

View File

@@ -491,6 +491,9 @@ class PMScript
}
}
$sScript .= substr( $this->sScript, $iAux );
if(preg_match('/\b(or|and|xor)\b/i' , $sScript)) {
$sScript = "( ".$sScript." )";
}
$sScript = '$bResult = ' . $sScript . ';';
// checks if the syntax is valid or if the variables in that condition has been previously defined
if ($this->validSyntax( $sScript ) && $variableIsDefined) {