From:             [EMAIL PROTECTED]
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

Reply via email to