Skip to content

Commit a7f2e09

Browse files
authored
bugfix: Fix incorrect exception being thrown
1 parent e131fee commit a7f2e09

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/XML/ds/AbstractDSAKeyValueType.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use DOMElement;
88
use SimpleSAML\Assert\Assert;
99
use SimpleSAML\XML\Exception\InvalidDOMElementException;
10+
use SimpleSAML\XML\Exception\MissingElementException;
1011
use SimpleSAML\XML\Exception\SchemaViolationException;
1112
use SimpleSAML\XML\Exception\TooManyElementsException;
1213
use SimpleSAML\XML\SchemaValidatableElementInterface;
@@ -153,7 +154,7 @@ public static function fromXML(DOMElement $xml): static
153154
Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class);
154155

155156
$y = Y::getChildrenOfClass($xml);
156-
Assert::minCount($y, 1, TooManyElementsException::class);
157+
Assert::minCount($y, 1, MissingElementException::class);
157158
Assert::maxCount($y, 1, TooManyElementsException::class);
158159

159160
$g = G::getChildrenOfClass($xml);

0 commit comments

Comments
 (0)