mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Remove bogus tree setting code from parentnode/tree.c (#15044)
I don't know why this code was here in the first place, it is present since the initial implementation. It doesn't make sense because: 1. It would require updating the refcounts if the document wasn't actually already set. 2. We enforce that the document is the same as the target document by this point, so setting the tree is pointless.
This commit is contained in:
parent
c4546d4923
commit
d5faf44e90
1 changed files with 1 additions and 2 deletions
|
@ -377,8 +377,7 @@ xmlNode* dom_zvals_to_single_node(php_libxml_ref_obj *document, xmlNode *context
|
|||
xmlUnlinkNode(newNode);
|
||||
}
|
||||
|
||||
newNodeObj->document = document;
|
||||
xmlSetTreeDoc(newNode, documentNode);
|
||||
ZEND_ASSERT(newNodeObj->document == document);
|
||||
|
||||
if (newNode->type == XML_DOCUMENT_FRAG_NODE) {
|
||||
/* Unpack document fragment nodes, the behaviour differs for different libxml2 versions. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue