cvs: ZendEngine2 / zend_objects.c
| From: | Marcus Boerger | Date: | Wed, 02 Jul 2003 23:58:47 +0000 |
| Subject: | cvs: ZendEngine2 / zend_objects.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1442@lists.php.net to get a copy of this message | ||
helly Wed Jul 2 19:58:47 2003 EDT
Modified files:
/ZendEngine2 zend_objects.c
Log:
Temporairy solution to overcome shutdown propbelms with objects that have
hidden destructors.
#
# If we set the error level to E_ERROR what we must to to be correct and an
# object needs to be automatically destructed in shutdown process then the
# exit would cause memory corruption and a SEGV.
Index: ZendEngine2/zend_objects.c
diff -u ZendEngine2/zend_objects.c:1.33 ZendEngine2/zend_objects.c:1.34
--- ZendEngine2/zend_objects.c:1.33 Wed Jul 2 19:53:53 2003
+++ ZendEngine2/zend_objects.c Wed Jul 2 19:58:47 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_objects.c,v 1.33 2003/07/02 23:53:53 helly Exp $ */
+/* $Id: zend_objects.c,v 1.34 2003/07/02 23:58:47 helly Exp $ */
#include "zend.h"
#include "zend_globals.h"
@@ -47,7 +47,8 @@
*/
if (object->ce != EG(scope)) {
zend_nuke_object(object TSRMLS_CC); /* unfortunately we *must* destroy it now anyway */
- zend_error(E_ERROR, "Call to private destructor from context '%s'",
EG(scope) ? EG(scope)->name : "");
+ /* this is a E_ERROR in real but we can't do that right now because of problems in
shutdown */
+ zend_error(E_WARNING, "Call to private destructor from context '%s'",
EG(scope) ? EG(scope)->name : "");
return;
}
} else {
@@ -55,7 +56,7 @@
*/
if (!zend_check_protected(destructor->common.scope, EG(scope))) {
zend_nuke_object(object TSRMLS_CC); /* unfortunately we *must* destroy it now anyway */
- zend_error(E_ERROR, "Call to protected destructor from context '%s'",
EG(scope) ? EG(scope)->name : "");
+ zend_error(E_WARNING, "Call to protected destructor from context '%s'",
EG(scope) ? EG(scope)->name : "");
return;
}
}