diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php index 30969d7ac..0686a9dcf 100644 --- a/classes/helper/HelperList.php +++ b/classes/helper/HelperList.php @@ -195,7 +195,7 @@ public function displayListContent() $position_group_identifier = Category::getRootCategory()->id; } - $positions = array_map(create_function('$elem', 'return (int)($elem[\'position\']);'), $this->_list); + $positions = array_map(function ($elem) { return (int)($elem['position']); }, $this->_list); sort($positions); } @@ -623,7 +623,7 @@ public function displayListHeader() if (is_string($value)) { $value = json_decode($value, true); } - if (!Validate::isCleanHtml($value[0]) || !Validate::isCleanHtml($value[1])) { + if (isset($value[0]) && !Validate::isCleanHtml($value[0]) || isset($value[1]) && !Validate::isCleanHtml($value[1])) { $value = ''; } $name = $this->list_id.'Filter_'.(isset($params['filter_key']) ? $params['filter_key'] : $key);