I am running 0.8.2 and have an issue with filter_var. It is not in the PHP that I use and I can not update php on this aging machine. Everything else seems to work OK.
Can someone assist me in a possible rewrite of this section of code?
function my_filter_var($s,$filter_type = FILTER_SANITIZE_STRING) { // 0.8.2: PREG_REPLACE vanishes in new versions of PHP...use filter_var instead:
$s=filter_var($s,$filter_type,FILTER_FLAG_STRIP_LOW);
$s=filter_var($s,$filter_type,FILTER_FLAG_STRIP_HIGH);
return $s;
}
The offending lines are the filter_var lines. Seems to me it could be done with PREG_REPLACE but I can not figure it out.
Thanks,
Jerry


