cvs: ZendEngine2 /tests bug36268.phpt php-src/main main.c
| From: | Dmitry Stogov | Date: | Fri, 03 Feb 2006 09:33:31 +0000 |
| Subject: | cvs: ZendEngine2 /tests bug36268.phpt php-src/main main.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4553@lists.php.net to get a copy of this message | ||
dmitry Fri Feb 3 09:33:31 2006 UTC
Modified files:
/php-src/main main.c
/ZendEngine2/tests bug36268.phpt
Log:
Fixed bug #36268 (Object destructors called even after fatal errors)
http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.661&r2=1.662&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.661 php-src/main/main.c:1.662
--- php-src/main/main.c:1.661 Tue Jan 17 12:18:53 2006
+++ php-src/main/main.c Fri Feb 3 09:33:31 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.661 2006/01/17 12:18:53 dmitry Exp $ */
+/* $Id: main.c,v 1.662 2006/02/03 09:33:31 dmitry Exp $ */
/* {{{ includes
*/
@@ -947,6 +947,7 @@
AG(memory_limit) = PG(memory_limit);
#endif
efree(buffer);
+ zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC);
zend_bailout();
return;
}
http://cvs.php.net/viewcvs.cgi/ZendEngine2/tests/bug36268.phpt?r1=1.1&r2=1.2&diff_format=u
Index: ZendEngine2/tests/bug36268.phpt
diff -u /dev/null ZendEngine2/tests/bug36268.phpt:1.2
--- /dev/null Fri Feb 3 09:33:31 2006
+++ ZendEngine2/tests/bug36268.phpt Fri Feb 3 09:33:31 2006
@@ -0,0 +1,14 @@
+--TEST--
+Bug #36268 (Object destructors called even after fatal errors)
+--FILE--
+<?php
+class Foo {
+ function __destruct() {
+ echo "Ha!\n";
+ }
+}
+$x = new Foo();
+bar();
+?>
+--EXPECTF--
+Fatal error: Call to undefined function bar() in %sbug36268.php on line 8