summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-02-24 18:41:08 +0000
committerFelipe Pena <felipe@php.net>2008-02-24 18:41:08 +0000
commit6a128d5614907415c2d61783d64a993df5c183ec (patch)
tree76e1a5e9021b77f2e32e66272f912482130db0c8
parentc47f4b9fd02d17c35deec5a57667abb93c309b0e (diff)
downloadphp-git-6a128d5614907415c2d61783d64a993df5c183ec.tar.gz
MFB: Fixed segfault in filter extension when using callbacks.
-rw-r--r--ext/filter/filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/filter/filter.c b/ext/filter/filter.c
index 16547a8534..1e3753316b 100644
--- a/ext/filter/filter.c
+++ b/ext/filter/filter.c
@@ -322,7 +322,7 @@ static void php_zval_filter(zval **value, long filter, long flags, zval *options
filter_func.function(*value, flags, options, charset TSRMLS_CC);
if (
- options &&
+ options && (Z_TYPE_P(options) == IS_ARRAY || Z_TYPE_P(options) == IS_OBJECT) &&
((flags & FILTER_NULL_ON_FAILURE && Z_TYPE_PP(value) == IS_NULL) ||
(!(flags & FILTER_NULL_ON_FAILURE) && Z_TYPE_PP(value) == IS_BOOL && Z_LVAL_PP(value) == 0)) &&
zend_hash_exists(HASH_OF(options), "default", sizeof("default"))