1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 16:38:25 +02:00

make it really W3C compatible (unlink node, when in tree...)

This commit is contained in:
Christian Stocker
2003-03-04 13:29:18 +00:00
parent 8d2773e188
commit 161db1b519
+2 -2
View File
@@ -2308,8 +2308,8 @@ PHP_FUNCTION(domxml_node_append_child)
RETURN_FALSE;
}
/* first unlink node, if child is already a child of parent */
if (child->parent == parent){
/* first unlink node, if child is already in the tree */
if (child->doc == parent->doc && child->parent != NULL){
xmlUnlinkNode(child);
}