Merge pull request #15472 from atm-florianm/FIX_12.0_CRON_methods_cant_be_called_without_params

Fix 12.0 cron methods cant be called without params
This commit is contained in:
Laurent Destailleur 2020-11-21 23:39:39 +01:00 committed by GitHub
commit 3c84962891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1052,7 +1052,10 @@ class Cronjob extends CommonObject
$object = new $this->objectname($this->db);
if ($this->entity > 0) $object->entity = $this->entity; // We work on a dedicated entity
$params_arr = array_map('trim', explode(",", $this->params));
$params_arr = array();
if (!empty($this->params) || $this->params === '0'){
$params_arr = array_map('trim', explode(",", $this->params));
}
if (!is_array($params_arr))
{