Merge pull request #14994 from grandoc/new_branch_12_10_2020

fix : undefined index
This commit is contained in:
Laurent Destailleur 2020-10-12 19:37:37 +02:00 committed by GitHub
commit 66a6415230
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -203,7 +203,7 @@ class Conf
{
$modulename = strtolower($reg[1]);
$partname = strtolower($reg[2]);
if (!is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); }
if (!isset($this->modules_parts[$partname]) || !is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); }
$arrValue = json_decode($value, true);
if (is_array($arrValue) && !empty($arrValue)) $value = $arrValue;
elseif (in_array($partname, array('login', 'menus', 'substitutions', 'triggers', 'tpl'))) $value = '/'.$modulename.'/core/'.$partname.'/';