summaryrefslogtreecommitdiff
path: root/Zend/zend_objects.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-05-31 12:59:31 +0000
committerDmitry Stogov <dmitry@php.net>2006-05-31 12:59:31 +0000
commit51e52e20ef9f1947658827fabb4bcb36aee40afd (patch)
tree6b476dfdacd55c95251963ad5c85f26152345579 /Zend/zend_objects.c
parent47edd8a303d27afe9ac8f84d0e923c713d294670 (diff)
downloadphp-git-51e52e20ef9f1947658827fabb4bcb36aee40afd.tar.gz
Support for nested exceptions and fatal errors in destructors
Diffstat (limited to 'Zend/zend_objects.c')
-rw-r--r--Zend/zend_objects.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c
index 4918150aaf..e2d86e8fe8 100644
--- a/Zend/zend_objects.c
+++ b/Zend/zend_objects.c
@@ -103,9 +103,10 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl
zval *file = zend_read_property(default_exception_ce, old_exception, "file", sizeof("file")-1, 1 TSRMLS_CC);
zval *line = zend_read_property(default_exception_ce, old_exception, "line", sizeof("line")-1, 1 TSRMLS_CC);
+ zval_ptr_dtor(&EG(exception));
+ EG(exception) = old_exception;
zend_error(E_ERROR, "Ignoring exception from %s::__destruct() while an exception is already active (Uncaught %s in %s on line %ld)",
object->ce->name, Z_OBJCE_P(old_exception)->name, Z_STRVAL_P(file), Z_LVAL_P(line));
- zval_ptr_dtor(&EG(exception));
}
EG(exception) = old_exception;
}