]> granicus.if.org Git - php/commitdiff
Allow user-defined error handlers to indicate whether default error
authorAndrei Zmievski <andrei@php.net>
Fri, 28 May 2004 17:28:33 +0000 (17:28 +0000)
committerAndrei Zmievski <andrei@php.net>
Fri, 28 May 2004 17:28:33 +0000 (17:28 +0000)
handler should be re-invoked, by returning true or false.

Zend/zend.c

index 8e928fb996ec17cb60223a24e70a5d3a3a873c70..b637538c5a6aa08e2a88a76a38340884b2c40059 100644 (file)
@@ -974,6 +974,9 @@ ZEND_API void zend_error(int type, const char *format, ...)
 
                        if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL TSRMLS_CC)==SUCCESS) {
                                if (retval) {
+                                       if (Z_TYPE_P(retval) != IS_NULL && !zend_is_true(retval)) {
+                                               zend_error_cb(type, error_filename, error_lineno, format, args);
+                                       }
                                        zval_ptr_dtor(&retval);
                                }
                        } else {