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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user