Merge pull request #22596 from ptibogxiv/patch-52

Fix php 8 error
This commit is contained in:
Laurent Destailleur 2022-10-17 23:14:49 +02:00 committed by GitHub
commit abb1317ef9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) > 0) {
$sql = sprintf($params['sql'], (int) $conf->entity, (int) getDolGlobalInt($key), (int) getDolGlobalInt($key));
$resql = $this->db->query($sql);