summaryrefslogtreecommitdiff
path: root/ext/dom/document.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-06-25 15:24:01 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-06-25 15:24:35 +0200
commitc9bc7dd110714be7d6d6e73184e21280f3896816 (patch)
treecf6e358118d095e5f0f9db67b01b11acf1a3a634 /ext/dom/document.c
parent049467d365bd090a507f4cf26ee6907a59833887 (diff)
downloadphp-git-c9bc7dd110714be7d6d6e73184e21280f3896816.tar.gz
Don't throw warning if exception thrown during dom validation
Diffstat (limited to 'ext/dom/document.c')
-rw-r--r--ext/dom/document.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c
index 89f6358775..aa1d99ebd2 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -1681,7 +1681,9 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type
sptr = xmlSchemaParse(parser);
xmlSchemaFreeParserCtxt(parser);
if (!sptr) {
- php_error_docref(NULL, E_WARNING, "Invalid Schema");
+ if (!EG(exception)) {
+ php_error_docref(NULL, E_WARNING, "Invalid Schema");
+ }
RETURN_FALSE;
}