Skip to content

Commit 3800c5d

Browse files
authored
Merge pull request #6279 from kenjis/fix-spark-routes-404-error
fix: `spark routes` shows 404 error when using regex
2 parents d2ef368 + d89bca7 commit 3800c5d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

system/Commands/Utilities/Routes/FilterFinder.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace CodeIgniter\Commands\Utilities\Routes;
1313

14+
use CodeIgniter\Exceptions\PageNotFoundException;
1415
use CodeIgniter\Filters\Filters;
1516
use CodeIgniter\Router\Exceptions\RedirectException;
1617
use CodeIgniter\Router\Router;
@@ -67,6 +68,11 @@ public function find(string $uri): array
6768
'before' => [],
6869
'after' => [],
6970
];
71+
} catch (PageNotFoundException $e) {
72+
return [
73+
'before' => ['<unknown>'],
74+
'after' => ['<unknown>'],
75+
];
7076
}
7177
}
7278
}

0 commit comments

Comments
 (0)