Skip to content

Commit

Permalink
Merge pull request #6279 from kenjis/fix-spark-routes-404-error
Browse files Browse the repository at this point in the history
fix: `spark routes` shows 404 error when using regex
  • Loading branch information
kenjis authored Jul 21, 2022
2 parents d2ef368 + d89bca7 commit 3800c5d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions system/Commands/Utilities/Routes/FilterFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace CodeIgniter\Commands\Utilities\Routes;

use CodeIgniter\Exceptions\PageNotFoundException;
use CodeIgniter\Filters\Filters;
use CodeIgniter\Router\Exceptions\RedirectException;
use CodeIgniter\Router\Router;
Expand Down Expand Up @@ -67,6 +68,11 @@ public function find(string $uri): array
'before' => [],
'after' => [],
];
} catch (PageNotFoundException $e) {
return [
'before' => ['<unknown>'],
'after' => ['<unknown>'],
];
}
}
}

0 comments on commit 3800c5d

Please sign in to comment.