From 3e3e2a375958921be659163c375bd0afe839e7fc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Jan 2026 21:02:02 +0100 Subject: [PATCH] Fix CI --- htdocs/accountancy/class/bookkeeping.class.php | 7 ++++--- htdocs/core/lib/functions.lib.php | 1 + htdocs/emailcollector/class/emailcollector.class.php | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 672a2777e49..4445d5a1fdf 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -3164,8 +3164,8 @@ class BookKeeping extends CommonObject $bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add $bookkeeping->thirdparty_code = ''; + /* $obj->subledger_account is not defined, so all code into if do the same then in else if ($separate_auxiliary_account) { - /* $obj->subledger_account is not defined here, so all this code do nothing $bookkeeping->subledger_account = $obj->subledger_account; $sql = 'SELECT'; $sql .= " subledger_label"; @@ -3181,13 +3181,14 @@ class BookKeeping extends CommonObject } $objtmp = $this->db->fetch_object($result); $bookkeeping->subledger_label = $objtmp->subledger_label ?? null; // latest subledger label used - */ + $bookkeeping->subledger_account = null; $bookkeeping->subledger_label = null; } else { + */ $bookkeeping->subledger_account = null; $bookkeeping->subledger_label = null; - } + //} $bookkeeping->numero_compte = $accountingaccount->account_number; $bookkeeping->label_compte = $accountingaccount->label; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 30960fe1d00..b6220161fef 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -686,6 +686,7 @@ function getBrowserInfo($user_agent) $user_agent = substr($user_agent, 0, 512); // Avoid to process too large user agent + // @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal Bad definition of Mobile_Detect function $detectmobile = new Mobile_Detect(null, $user_agent); $tablet = $detectmobile->isTablet(); diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 9a469df0fe2..c50ae34676b 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -2752,6 +2752,8 @@ class EmailCollector extends CommonObject $from = $contact_static->email; } + $from = (string) $from; + $result = $contactstatic->fetch(0, null, '', $from); if ($result < 0) { $errorforactions++;