From b5c745a573b9b3e99bb9d65f3971e2d8ee858725 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 3 Oct 2022 19:41:04 +0200 Subject: [PATCH] Fix warnings --- htdocs/cron/class/cronjob.class.php | 11 +++++++++-- htdocs/partnership/class/partnershiputils.class.php | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index a84fa3109df..b18c7146795 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -163,10 +163,16 @@ class Cronjob extends CommonObject public $libname; /** - * @var string A test condition to know if job is visible/qualified + * @var string A test condition to know if job is visible/qualified */ public $test; + /** + * @var string Autodelete + */ + public $autodelete; + + const STATUS_DISABLED = 0; const STATUS_ENABLED = 1; const STATUS_ARCHIVED = 2; @@ -1191,7 +1197,8 @@ class Cronjob extends CommonObject dol_syslog(get_class($this)."::run_jobs START ".$this->objectname."->".$this->methodename."(".$this->params.");", LOG_DEBUG); // Create Object for the called module - $object = new $this->objectname($this->db); + $nameofclass = $this->objectname; + $object = new $nameofclass($this->db); if ($this->entity > 0) { $object->entity = $this->entity; // We work on a dedicated entity } diff --git a/htdocs/partnership/class/partnershiputils.class.php b/htdocs/partnership/class/partnershiputils.class.php index 9ad2e5b7ca2..c73068e17a4 100644 --- a/htdocs/partnership/class/partnershiputils.class.php +++ b/htdocs/partnership/class/partnershiputils.class.php @@ -41,6 +41,8 @@ class PartnershipUtils public $error; //!< To return error code (or message) public $errors = array(); //!< To return several error codes (or messages) + public $output; // To store output of some cron methods + /** * Constructor