note 34389 deleted from language.operators.errorcontrol by tularis

From: Date: Tue, 12 Aug 2008 16:38:24 +0000
Subject: note 34389 deleted from language.operators.errorcontrol by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-143411@lists.php.net to get a copy of this message
Note Submitter: john-at-n0-spam-foobar-dot-nl ---- With set_error_handler() you bypass the standard error handler, which takes care of @. if (!($fp = @fopen('not_a_file', 'r'))) trigger_error("Can't open file!", E_USER_WARNING); ... generates ... Warning: fopen("not_a_file", "r") - No such file or directory in index.php on line 19. User Warning : Can't open file! in index.php on line 20. ... when I use my own error handler. With the standard error handler I only get the second warning. If someone knows how to use @ with your own error handler, let me know.

« previous php.notes (#143411) next »