Skip to content

Commit af10c61

Browse files
committed
use C::NS_XMLNS constant instead of the actual XMLNS namespace URI
1 parent b93a3de commit af10c61

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/XML/ExtendableAttributesTrait.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Dom;
88
use RuntimeException;
99
use SimpleSAML\XML\Assert\Assert;
10-
use SimpleSAML\XML\Attribute;
1110
use SimpleSAML\XML\Constants as C;
1211
use SimpleSAML\XMLSchema\Exception\InvalidDOMAttributeException;
1312
use SimpleSAML\XMLSchema\Exception\SchemaViolationException;
@@ -109,7 +108,7 @@ protected static function getAttributesNSFromXML(
109108
Assert::oneOf($namespace, NS::$PREDEFINED);
110109

111110
foreach ($xml->attributes as $a) {
112-
if ($a->namespaceURI === 'http://www.w3.org/2000/xmlns/') {
111+
if ($a->namespaceURI === C::NS_XMLNS) {
113112
continue;
114113
}
115114

@@ -152,7 +151,7 @@ protected static function getAttributesNSFromXML(
152151
}
153152

154153
foreach ($xml->attributes as $a) {
155-
if ($a->namespaceURI === 'http://www.w3.org/2000/xmlns/') {
154+
if ($a->namespaceURI === C::NS_XMLNS) {
156155
continue;
157156
}
158157

0 commit comments

Comments
 (0)