From 1d64c81d7c8cad4e99e7771c3fcc2553589ce961 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 3 Oct 2023 15:17:27 +0200 Subject: [PATCH] Help the LSP to narrow down the type --- .../files/lib/system/html/output/node/HtmlOutputNodeA.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeA.class.php b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeA.class.php index 0ccf682ed4..033e2bf50d 100644 --- a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeA.class.php +++ b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeA.class.php @@ -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(?PmessageFloatObject(?:Left|Right))\b~', -- 2.20.1