Fix cronjob.class.php

This commit is contained in:
ptibogxiv 2024-04-02 18:47:28 +02:00 committed by GitHub
parent a001d48252
commit e1e8e45a52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1295,11 +1295,10 @@ class Cronjob extends CommonObject
} else {
$result = call_user_func_array(array($object, $this->methodename), $params_arr);
}
$errmsg = '';
if ($result === false || (!is_bool($result) && $result != 0)) {
$langs->load("errors");
$errmsg = '';
if (!is_array($object->errors) || !in_array($object->error, $object->errors)) {
$errmsg .= $object->error;
}