ID:               17438
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-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] [EMAIL PROTECTED]

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

Reply via email to