diff options
Diffstat (limited to 'ext/dom/node.c')
-rw-r--r-- | ext/dom/node.c | 2 |
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) { |