Bug #17438 Updated: error_reporting() does not work if @ is placed before the function
| From: | derick@php.net | Date: | Sun, 26 May 2002 18:21:07 +0000 |
| Subject: | Bug #17438 Updated: error_reporting() does not work if @ is placed before the function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-8608@lists.php.net to get a copy of this message | ||
ID: 17438
Updated by: derick@php.net
Reported By: ilia@prohost.org
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Linux 2.4.18
PHP Version: 4.2.1
New Comment:
This is not a bug, the error_reporting value is deliberately modified
by @ (it's set to 0 before the call to the function, and restored to
the original value from before the call). Thus the modified value gets
lost here.
Feel free to open this as a feature request if you find it really
neccesairy to make this work.
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-05-26 14:02:04] ilia@prohost.org
Changing the error reporting level inside a scirpt useing the
error_reporting() function does not work if @ is present before the
function.
Ex.
(assuming php.ini has error_reporting set to E_ALL)
<?php
@error_reporting(E_ALL^E_NOTICE);
echo $a;
?>
Would still generate a warning about an undefined variable.
<?php
error_reporting(E_ALL^E_NOTICE);
echo $a;
?>
Works fine without any warnings.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17438&edit=1