Bug #17438: error_reporting() does not work if @ is placed before the function
| From: | ilia at prohost dot org | Date: | Sun, 26 May 2002 18:02:05 +0000 |
| Subject: | Bug #17438: error_reporting() does not work if @ is placed before the function | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-8601@lists.php.net to get a copy of this message | ||
From: ilia@prohost.org
Operating system: Linux 2.4.18
PHP version: 4.2.1
PHP Bug Type: Scripting Engine problem
Bug description: error_reporting() does not work if @ is placed before the function
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 bug report at http://bugs.php.net/?id=17438&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17438&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17438&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17438&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17438&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17438&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17438&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17438&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17438&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17438&r=globals