From: gms08701 at yahoo dot com Operating system: FreeBSD 4.8-RELEASE-p10 PHP version: 4.3.3 PHP Bug Type: *General Issues Bug description: error_reporting() and @ problem
Description: ------------ To my knowledge, when using @ at a function/variable/etc, it sets error_reporting to 0 at that instance, and return, to its previous state, after that instance. Unfortunately, after the instance of @, instead of returning to what it was set at previously, it returns to what is set in php.ini Reproduce code: --------------- --y.php-- <?php // error_reporting is currently at E_ALL (set from php.ini) // Set error_reporting to 0 error_reporting(0); // Returns 0 here var_dump(error_reporting()); ?> --z.php-- <?php @require('./y.php'); // This returns 2047 (E_ALL) var_dump(error_reporting()); ?> Expected result: ---------------- Its expected that z.php should return 0 from the var_dump(), where it inherits its error_reporting value from y.php, but is currently returning 2047 (E_ALL) When I remove '@' from require('./y.php'); in z.php, it then works correctly. -- Edit bug report at http://bugs.php.net/?id=26006&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26006&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26006&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26006&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26006&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26006&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26006&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26006&r=support Expected behavior: http://bugs.php.net/fix.php?id=26006&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26006&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26006&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26006&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26006&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26006&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26006&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26006&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26006&r=float