浏览代码

Fix php 8 error

ptibogxiv 2 年之前
父节点
当前提交
df51c0ea51
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      htdocs/datapolicy/class/datapolicycron.class.php

+ 2 - 2
htdocs/datapolicy/class/datapolicycron.class.php

@@ -451,8 +451,8 @@ class DataPolicyCron
 		$this->db->begin();
 
 		foreach ($arrayofparameters as $key => $params) {
-			if ($conf->global->$key != '' && is_numeric($conf->global->$key) && (int) $conf->global->$key > 0) {
-				$sql = sprintf($params['sql'], (int) $conf->entity, (int) $conf->global->$key, (int) $conf->global->$key);
+			if (getDolGlobalInt($key) != '' && is_numeric(getDolGlobalInt($key)) && (int) getDolGlobalInt($key) > 0) {
+				$sql = sprintf($params['sql'], (int) $conf->entity, (int) getDolGlobalInt($key), (int) getDolGlobalInt($key));
 
 				$resql = $this->db->query($sql);