首页 > 解决方案 > 如何“警告:htmlspecialchars() 期望参数 1 是字符串,

问题描述

我收到警告:

{"0":"Warning: htmlspecialchars() expects parameter 1 to be string, array given in \/app\/code\/Mageplaza\/LayeredNavigation\/Helper\/Data.php on line 68" 

第 68 行看起来像

foreach ($filterParams as $key=>$param){
            $filterParams[$key] = htmlspecialchars($param);
}

请帮忙。PHP版本是7.1

标签: php-7.1magento-2.3

解决方案


推荐阅读