cvs: ZendEngine2(PHP_5_0) / zend_objects.c
| From: | Marcus Boerger | Date: | Mon, 06 Sep 2004 19:16:35 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_0) / zend_objects.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2932@lists.php.net to get a copy of this message | ||
helly Mon Sep 6 15:16:35 2004 EDT
Modified files: (Branch: PHP_5_0)
/ZendEngine2 zend_objects.c
Log:
MFH Fix handling of exceptions in dtors
http://cvs.php.net/diff.php/ZendEngine2/zend_objects.c?r1=1.47&r2=1.47.2.1&ty=u
Index: ZendEngine2/zend_objects.c
diff -u ZendEngine2/zend_objects.c:1.47 ZendEngine2/zend_objects.c:1.47.2.1
--- ZendEngine2/zend_objects.c:1.47 Tue Mar 2 03:13:15 2004
+++ ZendEngine2/zend_objects.c Mon Sep 6 15:16:35 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_objects.c,v 1.47 2004/03/02 08:13:15 andi Exp $ */
+/* $Id: zend_objects.c,v 1.47.2.1 2004/09/06 19:16:35 helly Exp $ */
#include "zend.h"
#include "zend_globals.h"
@@ -76,10 +76,13 @@
old_exception = EG(exception);
EG(exception) = NULL;
zend_call_method_with_0_params(&obj, object->ce, NULL, "__destruct", NULL);
- if (EG(exception)) {
- zval_ptr_dtor(&EG(exception));
+ if (old_exception) {
+ if (EG(exception)) {
+ zend_error(E_ERROR, "Ignoring exception from %s::__destruct() while an exception is
already active", object->ce->name);
+ zval_ptr_dtor(&EG(exception));
+ }
+ EG(exception) = old_exception;
}
- EG(exception) = old_exception;
}
}