#33771 [NEW]: error_reporting falls to 0 level after some try/catch block

From: Date: Tue, 19 Jul 2005 13:33:13 +0000
Subject: #33771 [NEW]: error_reporting falls to 0 level after some try/catch block
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82146@lists.php.net to get a copy of this message
From:             s6urik at mail dot ee
Operating system: Linux
PHP version:      5.0.4
PHP Bug Type:     Scripting Engine problem
Bug description:  error_reporting falls to 0 level after some try/catch block

Description:
------------
If exception is throwed with error suppression (@) and catched by
try/catch block error_reporting will fall to 0

Reproduce code:
---------------
ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);

echo "1. error_reporting = " . error_reporting() . "\n";

function make_exception()
{
    throw new Exception();
}

try {
    @make_exception();
} catch (Exception $e) {}


echo "2. error_reporting = " . error_reporting() . "\n";

Expected result:
----------------
1. error_reporting = 4095
2. error_reporting = 4095


Actual result:
--------------
1. error_reporting = 4095
2. error_reporting = 0

-- 
Edit bug report at http://bugs.php.net/?id=33771&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33771&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33771&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33771&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33771&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33771&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33771&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33771&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33771&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33771&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33771&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=33771&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=33771&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33771&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33771&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33771&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33771&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33771&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33771&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33771&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33771&r=mysqlcfg


Thread (6 messages)

« previous php.bugs (#82146) next »