From 5bb21a93a1fba9ac222b9062c471ac51751ca750 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Sat, 27 Nov 2021 18:25:38 +0100 Subject: [PATCH] FIX fatal error on cron list. --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/cron/list.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 03366e9bae1..9a5ab68f898 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8082,7 +8082,7 @@ function verifCond($strRights) //print $strRights."
\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 } diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 4d829258b2b..686bb8a52a9 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -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 }