derick Tue, 29 Dec 2009 17:00:17 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=3177
Log:
- Fixed bug #389: Destructors called on fatal error.
Changed paths:
A xdebug/trunk/tests/bug00389.phpt
U xdebug/trunk/xdebug.c
Added: xdebug/trunk/tests/bug00389.phpt
===================================================================
--- xdebug/trunk/tests/bug00389.phpt (rev 0)
+++ xdebug/trunk/tests/bug00389.phpt 2009-12-29 17:00:17 UTC (rev 3177)
@@ -0,0 +1,26 @@
+--TEST--
+Test for bug #389: Destructors called on fatal error
+--INI--
+log_errors=0
+xdebug.default_enable=1
+--FILE--
+<?php
+class Food {
+ public function __destruct() {
+ echo "__destruct called\n";
+ }
+ }
+
+$f = new Food();
+echo "forcing fatal error:\n";
+Abc::def();
+
+?>
+DONE
+--EXPECTF--
+forcing fatal error:
+
+Fatal error: Class 'Abc' not found in %sbug00389.php on line 10
+
+Call Stack:
+%w%f%w%d 1. {main}() %sbug00389.php:0
Modified: xdebug/trunk/xdebug.c
===================================================================
--- xdebug/trunk/xdebug.c 2009-12-29 15:22:49 UTC (rev 3176)
+++ xdebug/trunk/xdebug.c 2009-12-29 17:00:17 UTC (rev 3177)
@@ -2735,6 +2735,7 @@
AG(memory_limit) = PG(memory_limit);
# endif
#endif
+ zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC);
zend_bailout();
return;
}
Received on Tue Dec 29 2009 - 17:00:17 GMT
This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST