From e6ff01e9ebb68df5298f29f5c1f10fe30c053994 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 25 Sep 2016 16:08:27 +0200 Subject: [PATCH] Array-like access to DOMNodeList is not supported in PHP 5.5 --- .../system/html/input/node/HtmlInputNodeProcessor.class.php | 3 +-- wcfsetup/install/files/lib/util/DOMUtil.class.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php index 8b2b4a18b3..4b2364ff97 100644 --- a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php +++ b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php @@ -220,8 +220,7 @@ class HtmlInputNodeProcessor extends AbstractHtmlNodeProcessor { /** @var \DOMElement $node */ if ($node->nodeName === 'p') { for ($i = 0, $length = $node->childNodes->length; $i < $length; $i++) { - /** @var \DOMNode $child */ - $child = $node->childNodes[$i]; + $child = $node->childNodes->item($i); if ($child->nodeType === XML_TEXT_NODE) { if (StringUtil::trim($child->textContent) !== '') { // terminate for() and while() diff --git a/wcfsetup/install/files/lib/util/DOMUtil.class.php b/wcfsetup/install/files/lib/util/DOMUtil.class.php index 57af1a1895..6422c05dc5 100644 --- a/wcfsetup/install/files/lib/util/DOMUtil.class.php +++ b/wcfsetup/install/files/lib/util/DOMUtil.class.php @@ -249,7 +249,7 @@ final class DOMUtil { } else if ($node->hasChildNodes()) { for ($i = 0, $length = $node->childNodes->length; $i < $length; $i++) { - if (!self::isEmpty($node->childNodes[$i])) { + if (!self::isEmpty($node->childNodes->item($i))) { return false; } } -- 2.20.1