2
0
forked from Wavyzz/dolibarr

Missing parentheses around or (||) condition

This commit is contained in:
atm-florian
2022-06-14 09:46:15 +02:00
parent 6c9d177040
commit 4403fdc29c

View File

@@ -8505,7 +8505,7 @@ function verifCond($strToEvaluate)
//dol_eval($str, 0, 1, '2'); // The dol_eval must contains all the global $xxx used into a condition
//var_dump($strToEvaluate);
$rep = dol_eval($strToEvaluate, 1, 1, '1'); // The dol_eval must contains all the global $xxx for all variables $xxx found into the string condition
$rights = $rep && !is_string($rep) || strpos($rep, 'Bad string syntax to evaluate') === false;
$rights = $rep && (!is_string($rep) || strpos($rep, 'Bad string syntax to evaluate') === false);
//var_dump($rights);
}
return $rights;