Quote Originally Posted by DrByte View Post
Therein is the problem. It is almost NEVER getting an array. The ONLY time it gets an array is when the product-notifications screen is presented. The zillion other times that the function is used there is no array passed at all.
I submit that your proposed fix is likely to cause the entire function to not return the right results, thus preventing normal operation of the majority of cases where this function is called.
Thus, its NOT SAFE to be used on live sites, unless of course you want to encounter lost sales and poor customer experience while shopping.
Fair point, then you just add a test for an array before it

A quick example is below

PHP Code:

$valueStr
=0
 
if (isarray($value)) { 
     
$valueStr=count($value)
}else {
     
$valueStr=strlen($value)
}

if ( (!
in_array($key$exclude_array)) && $valueStr 0) && ($key != 'main_page') && ($key != zen_session_name()) && ($key != 'error') && ($key != 'x') && ($key != 'y') ) { 
          if ( (
SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {