From 4afcfce6ad2bf0d5cd1dbd932790cf3aafb7f1e9 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 25 Sep 2025 19:42:52 -0400 Subject: [PATCH] Fix static analysis error in Content\Text\NPF - Using explicit DOMAttr->name property instead of expecting the array key to be the attribute name --- src/Content/Text/NPF.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Content/Text/NPF.php b/src/Content/Text/NPF.php index c830d64a0f..3fd0956720 100644 --- a/src/Content/Text/NPF.php +++ b/src/Content/Text/NPF.php @@ -321,8 +321,8 @@ class NPF list($npf, $text, $formatting) = self::routeChildren($element, $uri_id, false, $callstack, $npf, $text, $formatting); $attributes = []; - foreach ($element->attributes as $key => $attribute) { - $attributes[$key] = trim($attribute->value); + foreach ($element->attributes as $attribute) { + $attributes[$attribute->name] = trim($attribute->value); } if (!empty($attributes['href'])) { $formatting[] = [