Fix warning

This commit is contained in:
Laurent Destailleur 2023-01-12 10:10:28 +01:00
parent c1d12846f0
commit f251e92eaa
3 changed files with 6 additions and 6 deletions

View File

@ -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 {

View File

@ -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'),
);

View File

@ -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');
}