From: Alexander Ebert Date: Tue, 12 Jul 2016 08:22:29 +0000 (+0200) Subject: Fixed node splitting X-Git-Tag: 3.0.0_Beta_1~1196 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=325eb3e37b426954ea63cbb36079fcfcd83bb3bc;p=GitHub%2FWoltLab%2FWCF.git Fixed node splitting --- 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;