diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index cbf9ac6fba6..8ef166d933c 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -200,7 +200,7 @@ foreach ($modulesdir as $dir) { dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); } } else { - print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)
"; + print info_admin("Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)", 0, 0, '1', 'warning'); } } catch (Exception $e) { dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 27d0b5c0581..62c612ab24a 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -485,7 +485,7 @@ foreach ($modulesdir as $dir) { dol_syslog("Module ".get_class($objMod)." not qualified"); } } else { - print "admin/modules.php Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)
"; + print info_admin("admin/modules.php Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)", 0, 0, '1', 'warning'); } } catch (Exception $e) { dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php index 4cd42fe0243..94c29927cb9 100644 --- a/htdocs/admin/system/modules.php +++ b/htdocs/admin/system/modules.php @@ -67,7 +67,7 @@ $arrayfields = array( $arrayfields = dol_sort_array($arrayfields, 'position'); $param = ''; - +$info_admin = ''; /* * Actions @@ -120,7 +120,7 @@ foreach ($modulesdir as $dir) { dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); } } else { - print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)
"; + $info_admin .= info_admin("Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)", 0, 0, '1', 'warning'); } } } @@ -202,7 +202,7 @@ foreach ($modules as $key => $module) { */ llxHeader(); - +print $info_admin; print '
'; if ($optioncss != '') { print ''; diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 8e900c27462..63d504b14cb 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -75,10 +75,10 @@ class DolibarrApi * * Display a short message an return a http code 200 * - * @param string $field Field name - * @param mixed $value Value to check/clean - * @param Object $object Object - * @return string Value cleaned + * @param string $field Field name + * @param string|array $value Value to check/clean + * @param Object $object Object + * @return string|array Value cleaned */ protected function _checkValForAPI($field, $value, $object) { diff --git a/htdocs/core/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php index dec81f921ec..1852fc9f878 100644 --- a/htdocs/core/class/html.formsetup.class.php +++ b/htdocs/core/class/html.formsetup.class.php @@ -249,7 +249,7 @@ class FormSetup * saveConfFromPost * * @param bool $noMessageInUpdate display event message on errors and success - * @return int -1 if KO, 1 if OK + * @return int|null Return -1 if KO, 1 if OK, null if no items */ public function saveConfFromPost($noMessageInUpdate = false) { @@ -266,7 +266,6 @@ class FormSetup return $reshook; } - if (empty($this->items)) { return null; } diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index 70f6334972d..cd4dca967dc 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -1225,8 +1225,8 @@ class Productlot extends CommonObject $this->sellby = $now - 100000; $this->datec = $now - 3600; $this->tms = $now; - $this->fk_user_creat = null; - $this->fk_user_modif = null; + $this->fk_user_creat = 0; + $this->fk_user_modif = 0; $this->import_key = '123456'; }