From: Marcus Boerger Date: Sun, 21 May 2006 17:36:52 +0000 (+0000) Subject: - More exception related issues X-Git-Tag: BEFORE_NEW_OUTPUT_API~125 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e843518509581959aae71c8024fe8e2feeda8fa2;p=php - More exception related issues --- diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index ce88d32312..d8694279ca 100755 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -1317,8 +1317,10 @@ SPL_METHOD(RecursiveFilterIterator, getChildren) intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); zend_call_method_with_0_params(&intern->inner.zobject, intern->inner.ce, NULL, "getchildren", &retval); - if (!EG(exception)) { + if (!EG(exception) && retval) { spl_instantiate_arg_ex1(Z_OBJCE_P(getThis()), &return_value, 0, retval TSRMLS_CC); + } + if (retval) { zval_ptr_dtor(&retval); } } /* }}} */ @@ -1357,8 +1359,10 @@ SPL_METHOD(ParentIterator, getChildren) intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); zend_call_method_with_0_params(&intern->inner.zobject, intern->inner.ce, NULL, "getchildren", &retval); - if (retval) { + if (!EG(exception) && retval) { spl_instantiate_arg_ex1(Z_OBJCE_P(getThis()), &return_value, 0, retval TSRMLS_CC); + } + if (retval) { zval_ptr_dtor(&retval); } } /* }}} */