cvs: ZendEngine2(PHP_5_0) / zend_execute.c /tests bug30162.phpt php-src NEWS

From: Date: Wed, 04 May 2005 08:41:56 +0000
Subject: cvs: ZendEngine2(PHP_5_0) / zend_execute.c /tests bug30162.phpt php-src NEWS
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3643@lists.php.net to get a copy of this message
dmitry Wed May 4 04:41:56 2005 EDT Added files: (Branch: PHP_5_0) /ZendEngine2/tests bug30162.phpt Modified files: /php-src NEWS /ZendEngine2 zend_execute.c Log: Fixed bug #30162 (Catching exception in constructor couses lose of $this) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.366&r2=1.1760.2.367&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.366 php-src/NEWS:1.1760.2.367 --- php-src/NEWS:1.1760.2.366 Tue May 3 18:56:41 2005 +++ php-src/NEWS Wed May 4 04:41:53 2005 @@ -76,6 +76,8 @@ (Dmitry) - Fixed bug #30332 (zend.ze1_compatibility_mode isnt fully compatable with array_push()). (Dmitry) +- Fixed bug #30162 (Catching exception in constructor couses lose of $this). + (Dmitry) - Fixed bug #30126 (Enhancement for error message for abstract classes). (Marcus) - Fixed bug #29944 (Function defined in switch, crashes). (Dmitry) http://cvs.php.net/diff.php/ZendEngine2/zend_execute.c?r1=1.652.2.26&r2=1.652.2.27&ty=u Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.652.2.26 ZendEngine2/zend_execute.c:1.652.2.27 --- ZendEngine2/zend_execute.c:1.652.2.26 Fri Apr 29 03:03:34 2005 +++ ZendEngine2/zend_execute.c Wed May 4 04:41:55 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c,v 1.652.2.26 2005/04/29 07:03:34 dmitry Exp $ */ +/* $Id: zend_execute.c,v 1.652.2.27 2005/05/04 08:41:55 dmitry Exp $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -2815,9 +2815,11 @@ if (EG(exception) && EX(fbc) && EX(fbc)->common.fn_flags&ZEND_ACC_CTOR) { EG(This)->refcount--; if (EG(This)->refcount == 1) { - zend_object_store_ctor_failed(EG(This) TSRMLS_CC); + zend_object_store_ctor_failed(EG(This) TSRMLS_CC); + } + if (should_change_scope && EG(This) != current_this) { + zval_ptr_dtor(&EG(This)); } - zval_ptr_dtor(&EG(This)); } else if (should_change_scope) { zval_ptr_dtor(&EG(This)); } http://cvs.php.net/co.php/ZendEngine2/tests/bug30162.phpt?r=1.1&p=1 Index: ZendEngine2/tests/bug30162.phpt +++ ZendEngine2/tests/bug30162.phpt

« previous php.zend-engine.cvs (#3643) next »