We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efc32a2 commit cb628beCopy full SHA for cb628be
src/AbstractElement.php
@@ -9,7 +9,7 @@
9
use SimpleSAML\XML\Assert\Assert;
10
use SimpleSAML\XML\Exception\{MissingAttributeException, SchemaViolationException};
11
use SimpleSAML\XML\SerializableElementTrait;
12
-use SimpleSAML\XML\Type\{StringValue, ValueTypeInterface};
+use SimpleSAML\XML\Type\{QNameValue, StringValue, ValueTypeInterface};
13
14
use function array_slice;
15
use function defined;
@@ -79,7 +79,7 @@ public static function getAttribute(
79
);
80
81
$value = $xml->getAttribute($name);
82
- return $type::fromString($value);
+ return ($type === QNameValue::class) ? QNameValue::fromElement($value, $xml) : $type::fromString($value);
83
}
84
85
0 commit comments