From f251e92eaa54ad11559f3a9eab604aa9f2accf41 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Jan 2023 10:10:28 +0100 Subject: [PATCH] Fix warning --- htdocs/admin/modulehelp.php | 5 ++++- htdocs/core/modules/DolibarrModules.class.php | 4 ++-- htdocs/public/members/new.php | 3 --- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index 9a0c34aea2b..1af4b25bb27 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -498,7 +498,10 @@ if ($mode == 'feature') { if (isset($objMod->boxes) && is_array($objMod->boxes) && count($objMod->boxes)) { $i = 0; foreach ($objMod->boxes as $val) { - $text .= ($i ? ', ' : '').($val['file'] ? $val['file'] : $val[0]); + $boxstring = (empty($val['file']) ? (empty($val[0]) ? '' : $val[0]) : $val['file']); + if ($boxstring) { + $text .= ($i ? ', ' : '').$boxstring; + } $i++; } } else { diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index f88a05bd12b..96c8d14da31 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -976,8 +976,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $tmp = json_decode($obj->note, true); } return array( - 'authorid' => $tmp['authorid'], - 'ip' => $tmp['ip'], + 'authorid' => empty($tmp['authorid']) ? '' : $tmp['authorid'], + 'ip' => empty($tmp['ip']) ? '' : $tmp['ip'], 'lastactivationdate' => $this->db->jdate($obj->tms), 'lastactivationversion' => (!empty($tmp['lastactivationversion']) ? $tmp['lastactivationversion'] : 'unknown'), ); diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index b37cb15d9c0..7c3e5754b23 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -46,9 +46,6 @@ if (!defined('NOLOGIN')) { if (!defined('NOCSRFCHECK')) { define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. } -if (!defined('NOIPCHECK')) { - define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -} if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', '1'); }