Edit report at http://bugs.php.net/bug.php?id=54448&edit=1
ID: 54448 User updated by: mgfreshour at gmail dot com Reported by: mgfreshour at gmail dot com Summary: Empty if block causes catch block to be skipped -Status: Feedback +Status: Open Type: Bug Package: Compile Failure Operating System: CentOS PHP Version: 5.2.17 Block user comment: N Private report: N New Comment: I have verified this behavior on two boxes. The phpinfo are : http://dl.dropbox.com/u/750344/mf-phpinfo.html http://dl.dropbox.com/u/750344/dr-phpinfo.html One has xdebug and eAccelerator and the other has just eAccelerator. I'll create a VM without eAccelerator and attempt this again. If the behavior doesn't continue, I'll submit the but to them. Previous Comments: ------------------------------------------------------------------------ [2011-04-02 17:57:56] fel...@php.net I can't reproduce this issue. Are you using any Zend extension? ------------------------------------------------------------------------ [2011-04-02 00:11:12] mgfreshour at gmail dot com Description: ------------ The test script will result in an "PHP Fatal error: Uncaught exception 'Exception'" with output of : Start Commenting out the if block will result in the expected output of : Start Inside Finish It seems the empty if block is nullifying the catch blocks. Test script: --------------- <?php echo "Start\n"; try { try { throw new Exception("I'm dead"); if (0) { } } catch (Exception $e) { echo "Inside\n"; } } catch (Exception $e) { echo "Outside\n"; } echo "Finish\n"; Expected result: ---------------- Start Inside Finish Actual result: -------------- Start PHP Fatal error: Uncaught exception 'Exception' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54448&edit=1