php-7.1 - 如何“警告: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
解决方案
推荐阅读
- javascript - URLSearchParams 无法追加数组
- python - PYTHON:将 psycopg2 游标作为参数传递给另一个类
- java - 画布中弧线的阴影
- docker - 有没有办法连接两个 Docker 容器和主机?
- php - 警告:mysqli_fetch_array() 期望参数 1 为 mysqli_result,bool 给定
- rust - 访问向量状态并使用 near-sdk-rs 更新它
- r - 如何计算 R 中 1 和 0 向量中 1 或 0 的序列?
- google-cloud-firestore - Cloud Firestore 会拒绝或重新排队超出连接数和每秒写入数限制的请求吗?
- bash - Raspbian gphoto2:在同一台相机上使用实时取景和捕获图像?
- testing - 如何使用 selenium hub 在移动 chrome 上运行 testcafe 测试