Fixed handling of dynamically removed nodes
authorAlexander Ebert <ebert@woltlab.com>
Sun, 25 Sep 2016 21:46:51 +0000 (23:46 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 25 Sep 2016 21:46:51 +0000 (23:46 +0200)
wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMetacode.class.php

index 4870748bf685c1f097b20fdf2b6d2567aa7b130e..4c67812b78c5ddc512193e9677878ac61590f1ac 100644 (file)
@@ -66,6 +66,12 @@ class HtmlInputNodeWoltlabMetacode extends AbstractHtmlInputNode {
                
                /** @var \DOMElement $element */
                foreach ($elements as $element) {
+                       if ($element->parentNode === null) {
+                               // ignore elements that existed, but have been removed
+                               // from the DOM due to action taken by a converter
+                               continue;
+                       }
+                       
                        $name = $element->getAttribute('data-name');
                        if ($name === 'abstract') {
                                continue;