Reputation: 21
I have this error:
Warning: strlen() expects parameter 1 to be string, array given in /includes/functions/general.php on line 159
Line 159 is:
if ((strlen($value) > 0) && ($key != tep_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array)) && ($key != 'x') && ($key != 'y')) {
Could you help me solving this problem?
Upvotes: 1
Views: 1590
Reputation: 10138
strlen()
only works for strings. From the strlen()
documentation:
strlen()
returnsNULL
when executed on arrays, and anE_WARNING
level error is emitted.
If you have an array, use count()
to count the elements:
if (count($value) > 0)
Upvotes: 2