From: Alexander Ebert Date: Wed, 11 Oct 2017 14:25:47 +0000 (+0200) Subject: Fixed element parent block detection X-Git-Tag: 3.0.10~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ce76e4c0cd3f73483213854a641c12b2059d18a;p=GitHub%2FWoltLab%2FWCF.git Fixed element parent block detection --- diff --git a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacodeMarker.class.php b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacodeMarker.class.php index 7162f5140a..bdf37f6d77 100644 --- a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacodeMarker.class.php +++ b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacodeMarker.class.php @@ -344,6 +344,10 @@ class HtmlInputNodeWoltlabMetacodeMarker extends AbstractHtmlInputNode { $parentEnd = $end; do { $parentEnd = $parentEnd->parentNode; + if ($parentEnd === null) { + break; + } + if ($parentEnd->nodeName === 'li') { if ($parent === $parentEnd) { // same ancestor, exit both loops @@ -354,7 +358,7 @@ class HtmlInputNodeWoltlabMetacodeMarker extends AbstractHtmlInputNode { break; } } - while ($parent); + while ($parentEnd); $foundLi = true; }