Merge pull request #19504 from fappels/14_fix_fatal_eval

FIX 14.0.4 fatal error on cron list.
This commit is contained in:
Laurent Destailleur 2021-11-30 11:31:02 +01:00 committed by GitHub
commit c6fb026b75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -8082,7 +8082,7 @@ function verifCond($strRights)
//print $strRights."<br>\n";
$rights = true;
if ($strRights !== '') {
if (isset($strRights) && $strRights !== '') {
$str = 'if(!('.$strRights.')) { $rights = false; }';
dol_eval($str); // The dol_eval must contains all the global $xxx used into a condition
}

View File

@ -478,7 +478,7 @@ if ($num > 0) {
if (empty($obj)) {
break;
}
if (!verifCond($obj->test)) {
if (isset($obj->test) && !verifCond($obj->test)) {
continue; // Discard line with test = false
}