ID:               16570
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
-Bug Type:         *Programming Data Structures
+Bug Type:         Scripting Engine problem
 Operating System: i686-pc-linux-gnu
 PHP Version:      4.0CVS-2002-04-12
 New Comment:

Not a bug. If @ is used, error_reporting is set to 0.
You need to take care of it yourself in your error handler
function if you don't want to show errors in that case.

This is done this way to let users have as much control
as possible in their own error handlers.

And it is documented here:

http://www.php.net/manual/en/function.set-error-handler.php

--Jani



Previous Comments:
------------------------------------------------------------------------

[2002-04-12 12:49:16] [EMAIL PROTECTED]

Hi,

the @ Error Control Operator doesnt suppress warnings
(e.g.:E_WARNING),
if an own error handler is declared.

the follow code snip demonstrate the problem:

<?php
error_reporting(E_ALL);
function error_handler ($errno, $errstr, $errfile, $errline) {
        echo "$errstr <br>in $errfile<br>line $errline<br>";
}

$old_error_handler = set_error_handler('error_handler');

$dbconnect=@mysql_pconnect('foobar-server', 'bart', 'simson');
?>

I think this is a bug, because this behavior is not documented.


Regards,

Steve

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16570&edit=1

Reply via email to