Skip to content

Commit bf0e563

Browse files
committed
Fix raised exception
1 parent 4efe2ab commit bf0e563

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Assert/XPathFilterTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
namespace SimpleSAML\XML\Assert;
66

77
use Exception;
8-
use InvalidArgumentException;
98
use SimpleSAML\Assert\Assert as BaseAssert;
9+
use SimpleSAML\Assert\AssertionFailedException;
1010
use SimpleSAML\XML\Constants as C;
1111

1212
use function in_array;
@@ -148,7 +148,7 @@ public static function allowedXPathFilter(
148148
// Check that all the function names we found are in the list of allowed function names
149149
foreach ($matches[1] as $match) {
150150
if (!in_array($match, $allowed_functions)) {
151-
throw new InvalidArgumentException(sprintf(
151+
throw new AssertionFailedException(sprintf(
152152
$message ?: '\'%s\' is not an allowed XPath function.',
153153
$match,
154154
));
@@ -171,7 +171,7 @@ public static function allowedXPathFilter(
171171
// Check that all the axes names we found are in the list of allowed axes names
172172
foreach ($matches[1] as $match) {
173173
if (!in_array($match, $allowed_axes)) {
174-
throw new InvalidArgumentException(sprintf(
174+
throw new AssertionFailedException(sprintf(
175175
$message ?: '\'%s\' is not an allowed XPath axis.',
176176
$match,
177177
));

0 commit comments

Comments
 (0)