Help the LSP to narrow down the type
authorAlexander Ebert <ebert@woltlab.com>
Tue, 3 Oct 2023 13:17:27 +0000 (15:17 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 3 Oct 2023 13:17:27 +0000 (15:17 +0200)
wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeA.class.php

index 0ccf682ed4b923938fd1f968a8c2fe3e3d915438..033e2bf50d862a925cee506438084a2efa98ff84 100644 (file)
@@ -161,7 +161,7 @@ class HtmlOutputNodeA extends AbstractHtmlOutputNode
         // will cause the link marker to behave properly.
         if ($element->childNodes->length === 1) {
             $child = $element->childNodes->item(0);
-            if ($child->nodeType === \XML_ELEMENT_NODE && $child->nodeName === 'img') {
+            if ($child instanceof \DOMElement && $child->nodeName === 'img') {
                 if (
                     \preg_match(
                         '~\b(?P<className>messageFloatObject(?:Left|Right))\b~',