diff options
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r-- | ext/standard/array.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index 6eb6947dcf..ed917d71d0 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -6056,18 +6056,15 @@ PHP_FUNCTION(array_filter) fci.params = args; if (zend_call_function(&fci, &fci_cache) == SUCCESS) { + int retval_true; + zval_ptr_dtor(&args[0]); if (use_type == ARRAY_FILTER_USE_BOTH) { zval_ptr_dtor(&args[1]); } - if (!Z_ISUNDEF(retval)) { - int retval_true = zend_is_true(&retval); - - zval_ptr_dtor(&retval); - if (!retval_true) { - continue; - } - } else { + retval_true = zend_is_true(&retval); + zval_ptr_dtor(&retval); + if (!retval_true) { continue; } } else { |