From 15c05d9b7d5c6d953b1d3395fc17130b7e4c29a7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 31 Dec 2022 12:39:42 +0100 Subject: [PATCH] Fix warnings --- htdocs/comm/action/class/actioncomm.class.php | 10 ++++----- htdocs/core/class/extrafields.class.php | 18 ++++++++-------- htdocs/modulebuilder/index.php | 12 +++++------ htdocs/mrp/mo_card.php | 10 ++++----- htdocs/printing/admin/printing.php | 8 +++---- htdocs/product/admin/product.php | 11 +++++----- htdocs/projet/activity/permonth.php | 20 ++++++++++-------- htdocs/projet/activity/perweek.php | 21 ++++++++++--------- qodana.yaml | 1 + 9 files changed, 57 insertions(+), 54 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 244b3df9405..e77052e0690 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -225,22 +225,22 @@ class ActionComm extends CommonObject public $transparency; /** - * @var int (0 By default) + * @var int (0 By default) */ public $priority; /** - * @var int[] Array of user ids + * @var int[] Array of user ids */ public $userassigned = array(); /** - * @var int Id of user owner = fk_user_action into table + * @var int Id of user owner = fk_user_action into table */ public $userownerid; /** - * @var int Id of user that has done the event. Used only if AGENDA_ENABLE_DONEBY is set. + * @var int Id of user that has done the event. Used only if AGENDA_ENABLE_DONEBY is set. */ public $userdoneid; @@ -429,7 +429,7 @@ class ActionComm extends CommonObject $now = dol_now(); // Check parameters - if (!isset($this->userownerid) || $this->userownerid === '') { // $this->userownerid may be 0 (anonymous event) of > 0 + if (!isset($this->userownerid) || (string) $this->userownerid === '') { // $this->userownerid may be 0 (anonymous event) or > 0 dol_syslog("You tried to create an event but mandatory property ownerid was not defined", LOG_WARNING); $this->errors[] = 'ErrorActionCommPropertyUserowneridNotDefined'; return -1; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index b0bc0e55c06..e9817a36d6a 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1141,24 +1141,24 @@ class ExtraFields $out .= '