From fa397e02174055806efbf94d2b280422047736ca Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 2 Aug 2023 20:03:03 +0200 Subject: [PATCH] Respect strict error setting for adoptNode --- ext/dom/document.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/dom/document.c b/ext/dom/document.c index 425895c3240..939c4aca0e0 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1063,7 +1063,7 @@ PHP_METHOD(DOMDocument, adoptNode) || nodep->type == XML_DTD_NODE || nodep->type == XML_ENTITY_NODE || nodep->type == XML_NOTATION_NODE)) { - php_dom_throw_error(NOT_SUPPORTED_ERR, true); + php_dom_throw_error(NOT_SUPPORTED_ERR, dom_get_strict_error(dom_object_nodep->document)); RETURN_THROWS(); }