Originally Posted by
dbltoe
Still rearing it's ugly head from time to time but have not aggressively pursued it as I can't seem to find anything that dies because of it.
Are you actually able to determine anything that is not working due to this error?
It's only a "PHP Warning", so is not causing any script executions to fail.
Thus, it's a minor issue.
Indeed, thanks to some of torvista's debug data, I've found the cause, and it's an extremely minor issue.
Originally Posted by
dbltoe
Several of our sites are getting:
PHP Warning: strlen() expects parameter 1 to be string, array given in /home/site_name/public_html/includes/functions/functions_general.php on line 152
Commonalities are ... all debug files to the cache directory are timestamped at the conclusion of an order.
...
AND, only occasionally does any site throw this error. One site has 25+ orders this month with a mixture of PayPal and AIM. Only two orders (one for each) has thrown the error.
It only occurs at the conclusion of an order because it's specifically triggered only when the user is presented with a list of product-notification choices and they click the submit button on that page to update those choices. (It might also trigger on the account_notifications page if they were to visit there.)
The warning is harmless, and can be safely ignored.
If it's keeping you awake at night, you could move the in_array() condition check to the beginning of the list, by changing the line from
Code:
if ( (strlen($value) > 0) && ($key != 'main_page') && ($key != zen_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array)) && ($key != 'x') && ($key != 'y') ) {
to
Code:
if ( (!in_array($key, $exclude_array)) && (strlen($value) > 0) && ($key != 'main_page') && ($key != zen_session_name()) && ($key != 'error') && ($key != 'x') && ($key != 'y') ) {
Bookmarks