File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
system/Commands/Utilities Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 1818use CodeIgniter \Commands \Utilities \Routes \AutoRouterImproved \AutoRouteCollector as AutoRouteCollectorImproved ;
1919use CodeIgniter \Commands \Utilities \Routes \FilterCollector ;
2020use CodeIgniter \Commands \Utilities \Routes \SampleURIGenerator ;
21- use CodeIgniter \Exceptions \PageNotFoundException ;
2221use Config \Services ;
2322
2423/**
@@ -100,15 +99,7 @@ public function run(array $params)
10099 foreach ($ routes as $ route => $ handler ) {
101100 if (is_string ($ handler ) || $ handler instanceof Closure) {
102101 $ sampleUri = $ uriGenerator ->get ($ route );
103-
104- try {
105- $ filters = $ filterCollector ->get ($ method , $ sampleUri );
106- } catch (PageNotFoundException $ e ) {
107- $ filters = [
108- 'before ' => ['<unknown> ' ],
109- 'after ' => ['<unknown> ' ],
110- ];
111- }
102+ $ filters = $ filterCollector ->get ($ method , $ sampleUri );
112103
113104 $ tbody [] = [
114105 strtoupper ($ method ),
Original file line number Diff line number Diff line change 1111
1212namespace CodeIgniter \Commands \Utilities \Routes ;
1313
14+ use CodeIgniter \Exceptions \PageNotFoundException ;
1415use CodeIgniter \Filters \Filters ;
1516use CodeIgniter \Router \Exceptions \RedirectException ;
1617use 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}
You can’t perform that action at this time.
0 commit comments