From 8904ac7fefb7a3f27633c675d79302cd973b1585 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 18 Jun 2023 14:55:31 +0200 Subject: [PATCH] Add missing cache invalidation in dom_child_replace_with() This was forgotten during an earlier merge. --- ext/dom/parentnode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index c6d36f0c670..9d6e90ab721 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -553,6 +553,8 @@ void dom_child_replace_with(dom_object *context, zval *nodes, uint32_t nodesc) return; } + php_libxml_invalidate_node_list_cache_from_doc(context->document->ptr); + xmlNodePtr insertion_point = child->next; xmlNodePtr fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc);