Edit report at https://bugs.php.net/bug.php?id=54448&edit=1
ID: 54448 Comment by: benoit dot chenu at gmail dot com Reported by: mgfreshour at gmail dot com Summary: Empty if block causes catch block to be skipped 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've got the same problem on PHP 5.3.6 and also using eaccelerator 0.9.6. This is a known bug of eaccelerator's optimizer. To currently solve the problem, disable it : eaccelerator.optimizer="0" I suppose that the bug can be closed. ref : http://eaccelerator.net/ticket/317 Previous Comments: ------------------------------------------------------------------------ [2011-04-03 04:28:54] mgfreshour at gmail dot com 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. ------------------------------------------------------------------------ [2011-04-02 17:57:56] [email protected] 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 https://bugs.php.net/bug.php?id=54448&edit=1
