Skip to content

Commit f4bfddb

Browse files
committed
Simplify condition for more edge cases
1 parent 4879004 commit f4bfddb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ext/dom/document.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,9 +1143,7 @@ bool php_dom_adopt_node(xmlNodePtr nodep, dom_object *dom_object_new_document, x
11431143

11441144
#if LIBXML_VERSION < 21300
11451145
/* Must be first before transferring the ref to ensure the old document dictionary stays alive. */
1146-
if (LIBXML_VERSION < 21000 || nodep->type == XML_ATTRIBUTE_NODE) {
1147-
libxml_fixup_name_and_content_outer(old_doc, new_document, nodep);
1148-
}
1146+
libxml_fixup_name_and_content_outer(old_doc, new_document, nodep);
11491147
#endif
11501148

11511149
php_dom_transfer_document_ref(nodep, dom_object_new_document->document);

0 commit comments

Comments
 (0)