Bug #54448 [Opn->Nab]: Empty if block causes catch block to be skipped
| From: | datibbaw@php.net | Date: | Thu, 10 Oct 2013 03:54:02 +0000 |
| Subject: | Bug #54448 [Opn->Nab]: Empty if block causes catch block to be skipped | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182109@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=54448&edit=1
ID: 54448
Updated by: datibbaw@php.net
Reported by: mgfreshour at gmail dot com
Summary: Empty if block causes catch block to be skipped
-Status: Open
+Status: Not a bug
Type: Bug
Package: Compile Failure
Operating System: CentOS
PHP Version: 5.2.17
Block user comment: N
Private report: N
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2011-09-28 11:50:42] benoit dot chenu at gmail dot com
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
------------------------------------------------------------------------
[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] felipe@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 https://bugs.php.net/bug.php?id=54448&edit=1