ソースを参照

FIX fatal error on cron list.

Francis Appels 3 年 前
コミット
5bb21a93a1
2 ファイル変更2 行追加2 行削除
  1. 1 1
      htdocs/core/lib/functions.lib.php
  2. 1 1
      htdocs/cron/list.php

+ 1 - 1
htdocs/core/lib/functions.lib.php

@@ -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
 	}

+ 1 - 1
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
 		}