Skip to content

Commit

Permalink
Bugfix: ##other doesn't allow non-namespaced
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Jun 4, 2023
1 parent a1520d0 commit 89a31ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ExtendableAttributesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 89a31ba

Please sign in to comment.