I think the current behaviour is fine. The user defined error handler should get 
silenced errors as well, then it?s up to the developer to decide wether to ignore them 
or not.



Marten.

> -----Original Message-----
> From: Zeev Suraski [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, March 31, 2002 12:15 PM
> To: Stig S. Bakken
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-DEV] error handler callback gets silenced errors
> 
> 
> Don't you think it's better to allow the user to decide inside 
> the handler 
> whether he wants to silence this error?  It makes custom error 
> loggers more 
> powerful, even if error_reporting is set to 0 in the php.ini file.
> I think that if we are to pay attention to EG(error_reporting) before we 
> call the custom error handler, we should conduct a full check 
> (i.e., is the 
> error level within the EG(error_reporting) mask), rather than have a 
> special check for EG(error_reporting)==0. I'm not sure how people feel 
> about that..?
> 
> Zeev
> 
> At 01:48 31/03/2002, Stig S. Bakken wrote:
> >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
> >
> >
> >--
> >PHP Development Mailing List <http://www.php.net/>
> >To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> -- 
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to