diff options
| author | Derick Rethans <derick@php.net> | 2005-10-27 09:27:34 +0000 |
|---|---|---|
| committer | Derick Rethans <derick@php.net> | 2005-10-27 09:27:34 +0000 |
| commit | 50e247999df0f4a2c1d0a94aa5bc7a830bc902ef (patch) | |
| tree | e7a2a10cb77ba93d5b827d0fdc1d8c1ec5f8a325 | |
| parent | e90bbb864029edbd36934f4604e64d612beebad1 (diff) | |
| download | php-git-50e247999df0f4a2c1d0a94aa5bc7a830bc902ef.tar.gz | |
- Fixed a crash when a non-array option was passed in combination with the
callback filter.
| -rw-r--r-- | ext/filter/callback_filter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/filter/callback_filter.c b/ext/filter/callback_filter.c index 79ed4f5b51..446d72e56e 100644 --- a/ext/filter/callback_filter.c +++ b/ext/filter/callback_filter.c @@ -22,9 +22,9 @@ void php_filter_callback(PHP_INPUT_FILTER_PARAM_DECL) { char *name; zval *args[1]; - - if (!zend_is_callable(option_array, IS_CALLABLE_CHECK_NO_ACCESS, &name)) { - php_error_docref1(NULL TSRMLS_CC, name, E_WARNING, "First argument is expected to be a valid callback"); + + if (!option_array || !zend_is_callable(option_array, IS_CALLABLE_CHECK_NO_ACCESS, &name)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "First argument is expected to be a valid callback"); efree(name); Z_TYPE_P(value) = IS_NULL; return; |
