helly           Sun May 21 17:36:53 2006 UTC

  Modified files:              
    /php-src/ext/spl    spl_iterators.c 
  Log:
  - More exception related issues
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_iterators.c?r1=1.133&r2=1.134&diff_format=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.133 
php-src/ext/spl/spl_iterators.c:1.134
--- php-src/ext/spl/spl_iterators.c:1.133       Sun May 21 17:27:12 2006
+++ php-src/ext/spl/spl_iterators.c     Sun May 21 17:36:52 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_iterators.c,v 1.133 2006/05/21 17:27:12 helly Exp $ */
+/* $Id: spl_iterators.c,v 1.134 2006/05/21 17:36:52 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -1317,8 +1317,10 @@
        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 @@
        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);
        }
 } /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to