File tree Expand file tree Collapse file tree 4 files changed +12
-4
lines changed Expand file tree Collapse file tree 4 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,10 @@ public function setMethods($methods)
241
241
*/
242
242
public function getResources ()
243
243
{
244
+ if (0 === count ($ this ->routeCollections )) {
245
+ return [];
246
+ }
247
+
244
248
$ resources = array_map (function (RouteCollection $ routeCollection ) {
245
249
return $ routeCollection ->getResources ();
246
250
}, $ this ->routeCollections );
Original file line number Diff line number Diff line change @@ -124,12 +124,12 @@ public function all()
124
124
*/
125
125
protected function sortRouters ()
126
126
{
127
- krsort ($ this ->routers );
128
-
129
127
if (0 === count ($ this ->routers )) {
130
128
return [];
131
129
}
132
130
131
+ krsort ($ this ->routers );
132
+
133
133
return call_user_func_array ('array_merge ' , $ this ->routers );
134
134
}
135
135
Original file line number Diff line number Diff line change @@ -348,12 +348,12 @@ public function getRouteEnhancers()
348
348
*/
349
349
protected function sortRouteEnhancers ()
350
350
{
351
- krsort ($ this ->enhancers );
352
-
353
351
if (0 === count ($ this ->enhancers )) {
354
352
return [];
355
353
}
356
354
355
+ krsort ($ this ->enhancers );
356
+
357
357
return call_user_func_array ('array_merge ' , $ this ->enhancers );
358
358
}
359
359
Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ public function getRouteFilters()
175
175
*/
176
176
protected function sortFilters ()
177
177
{
178
+ if (0 === count ($ this ->filters )) {
179
+ return [];
180
+ }
181
+
178
182
krsort ($ this ->filters );
179
183
180
184
return call_user_func_array ('array_merge ' , $ this ->filters );
You can’t perform that action at this time.
0 commit comments