From: php at girsbrain dot org Operating system: Windows XP SP 2 PHP version: 5.2.0 PHP Bug Type: Class/Object related Bug description: Able to thrown an Exception in a Destructor
Description: ------------ On the Constructor/Destructor page in the manual, the last note states that "Attempting to throw an exception from a destructor causes a fatal error." I've come into a scenario where I am able to throw an Exception, without fail, from a Destructor. Below are just two examples, I'm sure there are more. Reproduce code: --------------- http://www.girsbrain.org/php_bugs/exception_deconstructor_01.phps http://www.girsbrain.org/php_bugs/exception_deconstructor_02.phps Expected result: ---------------- Fatal error: Exception thrown without a stack frame in Unknown on line 0 Actual result: -------------- This should produce a Fatal error, but it doesn't #0 \test.php(10): TestClass->__destruct() #1 {main} -- Edit bug report at http://bugs.php.net/?id=40024&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40024&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40024&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40024&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40024&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40024&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40024&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40024&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40024&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40024&r=support Expected behavior: http://bugs.php.net/fix.php?id=40024&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40024&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40024&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40024&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40024&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40024&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40024&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40024&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40024&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40024&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40024&r=mysqlcfg