Skip to content

Commit adbc291

Browse files
committed
fix: spark routes may show BadRequestException when regexp is in route
E.g., CodeIgniter\HTTP\Exceptions\BadRequestException: The URI you submitted has disallowed characters: "(. )"
1 parent 6107a60 commit adbc291

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

system/Commands/Utilities/Routes/FilterFinder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
use CodeIgniter\Exceptions\PageNotFoundException;
1717
use CodeIgniter\Filters\Filters;
18+
use CodeIgniter\HTTP\Exceptions\BadRequestException;
1819
use CodeIgniter\HTTP\Exceptions\RedirectException;
1920
use CodeIgniter\Router\Router;
2021
use Config\Feature;
@@ -72,7 +73,7 @@ public function find(string $uri): array
7273
'before' => [],
7374
'after' => [],
7475
];
75-
} catch (PageNotFoundException) {
76+
} catch (BadRequestException|PageNotFoundException) {
7677
return [
7778
'before' => ['<unknown>'],
7879
'after' => ['<unknown>'],

0 commit comments

Comments
 (0)