The filter extensinon will segfault if a callback filter returns
FALSE, this little patch fixes that.
There is also no way to set default value if the callback fails
because of a design flow. When dealing with callbacks the 'options'
key in the options parameters just be a valid callback, but to set a
default value then this key must be a array that includes the key
'default'.
Test case:
function filter_test($str) { return FALSE; }
var_dump(filter_var('durty/boy', FILTER_CALLBACK, array(
'options' => 'filter_test',
)));
Arnar Mar Sig
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php