From e105b577ee813679ea2a593797796da02ee8cc7d Mon Sep 17 00:00:00 2001 From: MDW Date: Wed, 20 Mar 2024 18:46:04 +0100 Subject: [PATCH] Fix PhanTypeMismatchReturn by changing return and logging error --- htdocs/core/modules/societe/modules_societe.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/societe/modules_societe.class.php b/htdocs/core/modules/societe/modules_societe.class.php index 4e1bd2e5865..f5ac07fb2ff 100644 --- a/htdocs/core/modules/societe/modules_societe.class.php +++ b/htdocs/core/modules/societe/modules_societe.class.php @@ -255,13 +255,14 @@ abstract class ModeleAccountancyCode extends CommonNumRefGenerator * @param DoliDB $db Database handler * @param Societe $societe Third party object * @param string $type 'customer' or 'supplier' - * @return int >=0 if OK, <0 if KO + * @return int<-1,1> >=0 if success, -1 if failure */ public function get_code($db, $societe, $type = '') { // phpcs:enable global $langs; - return $langs->trans("NotAvailable"); + dol_syslog(get_class($this)."::get_code".$langs->trans("NotAvailable"), LOG_ERR); + return -1; } }