From 325eb3e37b426954ea63cbb36079fcfcd83bb3bc Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 12 Jul 2016 10:22:29 +0200 Subject: [PATCH] Fixed node splitting --- wcfsetup/install/files/lib/util/DOMUtil.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/util/DOMUtil.class.php b/wcfsetup/install/files/lib/util/DOMUtil.class.php index eebde6c26c..36a94ae0fa 100644 --- a/wcfsetup/install/files/lib/util/DOMUtil.class.php +++ b/wcfsetup/install/files/lib/util/DOMUtil.class.php @@ -445,11 +445,12 @@ final class DOMUtil { $currentNode = $node; while (($parent = $currentNode->parentNode) !== $ancestor) { + /** @var \DOMElement $newNode */ $newNode = $parent->cloneNode(); self::insertBefore($newNode, $parent); while ($currentNode->previousSibling) { - $newNode->appendChild($currentNode->previousSibling); + self::prepend($currentNode->previousSibling, $newNode); } $currentNode = $parent; -- 2.20.1