summaryrefslogtreecommitdiff
path: root/ext/dom/node.c
diff options
context:
space:
mode:
authorRob Richards <rrichards@php.net>2007-03-18 21:31:05 +0000
committerRob Richards <rrichards@php.net>2007-03-18 21:31:05 +0000
commitb172d3f8cd9710ded61cfe9e13187db43bcdde65 (patch)
treec65b522b29098ada4d13a15e3a1f047b2d8c91f9 /ext/dom/node.c
parentff0864ebacbf05f0f30aadbbc62f1d597151267a (diff)
downloadphp-git-b172d3f8cd9710ded61cfe9e13187db43bcdde65.tar.gz
MFH: fix bug #40836 (Segfault in ext/dom)
add test
Diffstat (limited to 'ext/dom/node.c')
-rw-r--r--ext/dom/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dom/node.c b/ext/dom/node.c
index f9c359ba8d..d5cb048537 100644
--- a/ext/dom/node.c
+++ b/ext/dom/node.c
@@ -1012,7 +1012,7 @@ PHP_FUNCTION(dom_node_insert_before)
new_child = xmlAddPrevSibling(refp, child);
}
} else {
- if (child->parent == parentp){
+ if (child->parent != NULL){
xmlUnlinkNode(child);
}
if (child->type == XML_TEXT_NODE && parentp->last != NULL && parentp->last->type == XML_TEXT_NODE) {