Is this valid PHP syntax? I think it may be causing the following warning:
Warning: Illegal offset type
$filterclear = str_replace($tag, '', $queryString);
$filterclear = str_replace(array('=+', '++', '+&'), array('=', '+', '&'), $filterclear);
Is this valid PHP syntax? I think it may be causing the following warning:
Warning: Illegal offset type
$filterclear = str_replace($tag, '', $queryString);
$filterclear = str_replace(array('=+', '++', '+&'), array('=', '+', '&'), $filterclear);
It looks fine, so the only thing I can think of is that you may be using an object instead of a string in either the $tag
variable or $queryString
variable. I would try var_dump()
ing these variables to ensure that they are of the right type. If they are this function is most likely not the culprit.