Fixed DOMNodeList access in PHP 5.5
authorAlexander Ebert <ebert@woltlab.com>
Mon, 23 Jan 2017 11:36:06 +0000 (12:36 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 23 Jan 2017 11:36:06 +0000 (12:36 +0100)
wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php

index fa7d012de34b524949da1fee753a6d06f889b9b7..89d3e947f0cb016857dfe8bcac1817f4d84ed757 100644 (file)
@@ -80,7 +80,7 @@ abstract class AbstractHtmlNodeProcessor implements IHtmlNodeProcessor {
                $pres = $this->document->getElementsByTagName('pre');
                for ($i = 0, $length = $pres->length; $i < $length; $i++) {
                        /** @var \DOMElement $pre */
-                       $pre = $pres[$i];
+                       $pre = $pres->item($i);
                        /** @var \DOMNode $node */
                        foreach ($pre->childNodes as $node) {
                                if ($node->nodeType === XML_TEXT_NODE && mb_strpos($node->textContent, '@@@WCF_PRE_LINEBREAK@@@') !== false) {