diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-25 15:24:01 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-25 15:24:35 +0200 |
commit | c9bc7dd110714be7d6d6e73184e21280f3896816 (patch) | |
tree | cf6e358118d095e5f0f9db67b01b11acf1a3a634 /ext/libxml/libxml.c | |
parent | 049467d365bd090a507f4cf26ee6907a59833887 (diff) | |
download | php-git-c9bc7dd110714be7d6d6e73184e21280f3896816.tar.gz |
Don't throw warning if exception thrown during dom validation
Diffstat (limited to 'ext/libxml/libxml.c')
-rw-r--r-- | ext/libxml/libxml.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 85eaf7a026..d77f6aa2fd 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -485,7 +485,6 @@ static void php_libxml_internal_error_handler(int error_type, void *ctx, const c char *buf; int len, len_iter, output = 0; - len = vspprintf(&buf, 0, *msg, ap); len_iter = len; @@ -502,7 +501,8 @@ static void php_libxml_internal_error_handler(int error_type, void *ctx, const c if (output == 1) { if (LIBXML(error_list)) { _php_list_set_error_structure(NULL, ZSTR_VAL(LIBXML(error_buffer).s)); - } else { + } else if (!EG(exception)) { + /* Don't throw additional notices/warnings if an exception has already been thrown. */ switch (error_type) { case PHP_LIBXML_CTX_ERROR: php_libxml_ctx_error_level(E_WARNING, ctx, ZSTR_VAL(LIBXML(error_buffer).s)); |