summaryrefslogtreecommitdiff
path: root/ext/domxml
diff options
context:
space:
mode:
authorChristian Stocker <chregu@php.net>2003-03-04 13:38:38 +0000
committerChristian Stocker <chregu@php.net>2003-03-04 13:38:38 +0000
commit6804378398c42b2ea5b4530984b6e03807439fa7 (patch)
tree43915c7d412c7a354f499af20658bb281b783526 /ext/domxml
parente0c3e2cf93c6562514e52e15e891b34dee977499 (diff)
downloadphp-git-6804378398c42b2ea5b4530984b6e03807439fa7.tar.gz
MFB (make it really W3C compatible (unlink node, when in tree...))
Diffstat (limited to 'ext/domxml')
-rw-r--r--ext/domxml/php_domxml.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c
index 5e2b9b343a..9027d42a80 100644
--- a/ext/domxml/php_domxml.c
+++ b/ext/domxml/php_domxml.c
@@ -2329,8 +2329,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);
}