警告:strlen()需要参数1 [英] Warning: strlen() expects parameter 1

查看:118
本文介绍了警告:strlen()需要参数1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不断在magento的system.log中看到以下错误.我进入了确切的文件,但看不到任何错误.

I am constantly seeing the following error in my system.log in magento. I have gone into the exact file but can not see anything wrong with it.

还有其他人经历过吗?

警告:strlen()期望参数1为字符串,数组形式为 /home/beerhawk/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php 在第93行

Warning: strlen() expects parameter 1 to be string, array given in /home/beerhawk/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php on line 93

推荐答案

错误消息说明了所有内容-您将数组传递给strlen,但strlen需要一个字符串.如果需要and数组的长度,则应使用count.

The error message says everything - you passing an array to strlen, but strlen expects an string. If you want the length of and array, you should use count.

如果您真的想要一个字符串的长度,则应该检查代码,这些代码肯定存在一些逻辑问题

If you really want the length of an string, you should check your code, which have definitally some logical issues

这篇关于警告:strlen()需要参数1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆