From a3a3cc7546302545aace2b510c4b797d25682080 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 18 Sep 2006 23:11:01 +0000 Subject: [PATCH] MFB: Avoid generating php_errormsg twice in some instances. --- main/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/main.c b/main/main.c index abe09b232d..9a14a1c475 100644 --- a/main/main.c +++ b/main/main.c @@ -680,7 +680,8 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c php_error(type, "%s", message); efree(message); - if (PG(track_errors) && module_initialized && EG(active_symbol_table)) { + if (PG(track_errors) && module_initialized && EG(active_symbol_table) && + (!EG(user_error_handler) || !(EG(user_error_handler_error_reporting) & type))) { zval *tmp; ALLOC_INIT_ZVAL(tmp); ZVAL_RT_STRINGL(tmp, buffer, buffer_len, 1); @@ -947,8 +948,7 @@ static void php_error_cb(int type, const char *error_filename, const uint error_ if (PG(track_errors) && module_initialized && EG(active_symbol_table)) { zval *tmp; - ALLOC_ZVAL(tmp); - INIT_PZVAL(tmp); + ALLOC_INIT_ZVAL(tmp); ZVAL_RT_STRINGL(tmp, buffer, buffer_len, 1); zend_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void **) & tmp, sizeof(zval *), NULL); } -- 2.40.0