diff options
Diffstat (limited to 'ext/dom/parentnode.c')
-rw-r--r-- | ext/dom/parentnode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index f47416edff..375c692dca 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -374,10 +374,6 @@ void dom_child_node_remove(dom_object *context) xmlNodePtr children; int stricterror; - if (dom_node_children_valid(child) == FAILURE) { - return; - } - stricterror = dom_get_strict_error(context->document); if (dom_node_is_read_only(child) == SUCCESS || @@ -391,6 +387,10 @@ void dom_child_node_remove(dom_object *context) return; } + if (dom_node_children_valid(child->parent) == FAILURE) { + return; + } + children = child->parent->children; if (!children) { php_dom_throw_error(NOT_FOUND_ERR, stricterror); |