forked from Wavyzz/dolibarr
FIX dol_eval with function starting with !
This commit is contained in:
@@ -9189,7 +9189,8 @@ function verifCond($strToEvaluate)
|
||||
$rights = true;
|
||||
if (isset($strToEvaluate) && $strToEvaluate !== '') {
|
||||
//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
|
||||
//$rep = dol_eval($strToEvaluate, 1, 0, '1'); // to show the error
|
||||
$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);
|
||||
//var_dump($rights);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user