File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 7
7
use Exception ;
8
8
use InvalidArgumentException ;
9
9
use SimpleSAML \Assert \Assert as BaseAssert ;
10
+ use SimpleSAML \Assert \AssertionFailedException ;
10
11
use SimpleSAML \XML \Constants as C ;
11
12
12
13
use function in_array ;
@@ -148,7 +149,7 @@ public static function allowedXPathFilter(
148
149
// Check that all the function names we found are in the list of allowed function names
149
150
foreach ($ matches [1 ] as $ match ) {
150
151
if (!in_array ($ match , $ allowed_functions )) {
151
- throw new InvalidArgumentException (sprintf (
152
+ throw new AssertionFailedException (sprintf (
152
153
$ message ?: '\'%s \' is not an allowed XPath function. ' ,
153
154
$ match ,
154
155
));
@@ -171,7 +172,7 @@ public static function allowedXPathFilter(
171
172
// Check that all the axes names we found are in the list of allowed axes names
172
173
foreach ($ matches [1 ] as $ match ) {
173
174
if (!in_array ($ match , $ allowed_axes )) {
174
- throw new InvalidArgumentException (sprintf (
175
+ throw new AssertionFailedException (sprintf (
175
176
$ message ?: '\'%s \' is not an allowed XPath axis. ' ,
176
177
$ match ,
177
178
));
You can’t perform that action at this time.
0 commit comments