summaryrefslogtreecommitdiff
path: root/ext/domxml/php_domxml.c
diff options
context:
space:
mode:
authorChristian Stocker <chregu@php.net>2003-03-04 13:29:18 +0000
committerChristian Stocker <chregu@php.net>2003-03-04 13:29:18 +0000
commit161db1b519f4d2e2faf5af65ae5930ffaa0f0dbf (patch)
tree33e8dfc1e52b4b13f38816fb57b3be6d8371be30 /ext/domxml/php_domxml.c
parent8d2773e188359d886e322d9cbd18d96dfff2e2c6 (diff)
downloadphp-git-161db1b519f4d2e2faf5af65ae5930ffaa0f0dbf.tar.gz
make it really W3C compatible (unlink node, when in tree...)
Diffstat (limited to 'ext/domxml/php_domxml.c')
-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 ca07268c6d..8b5f8976e9 100644
--- a/ext/domxml/php_domxml.c
+++ b/ext/domxml/php_domxml.c
@@ -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);
}