error handler callback gets silenced errors

From: Date: Sat, 30 Mar 2002 22:48:24 +0000
Subject: error handler callback gets silenced errors
Groups: php.dev 
Request: Send a blank email to php-dev+get-81967@lists.php.net to get a copy of this message
Hi, When using set_error_handler, my error handler function is called even when I silence errors. IMHO that's just silly. Proposing the following patch: Index: zend.c =================================================================== RCS file: /repository/Zend/zend.c,v retrieving revision 1.145 diff -u -2 -b -B -w -u -r1.145 zend.c --- zend.c 26 Feb 2002 18:59:25 -0000 1.145 +++ zend.c 30 Mar 2002 22:45:06 -0000 @@ -639,4 +639,8 @@ TSRMLS_FETCH(); + /* Don't bother if we are not going to report anything anyway */ + if (EG(error_reporting) == 0) { + return; + } /* Obtain relevant filename and lineno */ switch (type) { - Stig

« previous php.dev (#81967) next »