BUG-14835-14183 When a trigger containing the statement 'if (@ @ test! = '1' && @ @ Test2 =='') 'using the Boolean operator'! = 'Create throws an error code evaluation & support expresion @@a = @@b = @@c; .SOLVED.

This commit is contained in:
Roly Rudy Gutierrez Pinto
2014-05-15 15:14:36 -04:00
parent 59e30b6166
commit eb768ec8bc

View File

@@ -246,6 +246,22 @@ class PMScript
}
}
$sScript .= $sAux;
/** patch1: support for the expression: @@a = @@b = @@c = @@d; */
$bEqual = true;
if ($i < $iOcurrences - 1) {
$ii = $aMatch[0][$i][1] + strlen($aMatch[0][$i][0]);
$ss = trim(substr($this->sScript, $ii, $aMatch[0][$i + 1][1] - $ii));
} else {
$ii = $aMatch[0][$i][1] + strlen($aMatch[0][$i][0]);
$ss = trim(substr($this->sScript, $ii));
}
$sw0 = strpos($ss, '=') === 0 || strpos($ss, '+=') === 0 || strpos($ss, '-=') === 0;
$sw1 = strpos($ss, '==') === 0 || strpos($ss, '===') === 0 || strpos($ss, '!=') === 0 || strpos($ss, '!==') === 0 || strpos($ss, '<=') === 0 || strpos($ss, '>=') === 0;
$sw3 = substr(trim($sAux), strlen(trim($sAux)) - 6, strlen(trim($sAux))) === "empty(";
if (($sw0 && !$sw1) || $sw3) {
$bEqual = false;
}
/** patch1 end */
$iAux = $aMatch[0][$i][1] + strlen( $aMatch[0][$i][0] );
switch ($aMatch[1][$i][0]) {
case '@':