From 89a31ba1dd5bf5fe7573555e3d8238f9af66df5f Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Sun, 4 Jun 2023 23:46:50 +0200 Subject: [PATCH] Bugfix: ##other doesn't allow non-namespaced --- src/ExtendableAttributesTrait.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ExtendableAttributesTrait.php b/src/ExtendableAttributesTrait.php index ee0b964..98e8695 100644 --- a/src/ExtendableAttributesTrait.php +++ b/src/ExtendableAttributesTrait.php @@ -15,6 +15,7 @@ use function array_search; use function defined; use function implode; +use function in_array; use function is_array; use function rtrim; use function sprintf; @@ -113,7 +114,7 @@ protected static function getAttributesNSFromXML(DOMElement $xml, string|array $ } } elseif ($namespace === C::XS_ANY_NS_OTHER) { foreach ($xml->attributes as $a) { - if ($a->namespaceURI !== static::NS) { + if (!in_array($a->namespaceURI, [static::NS, null], true)) { $attributes[] = new Attribute($a->namespaceURI, $a->prefix, $a->localName, $a->nodeValue); } }