File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -202,18 +202,20 @@ public function toSymfonyRouteCollection()
202202 {
203203 $ symfonyRoutes = new SymfonyRouteCollection ;
204204
205- $ routes = $ this -> getRoutes () ;
205+ $ fallbackRoutes = [] ;
206206
207- foreach ($ routes as $ route ) {
208- if (! $ route ->isFallback ) {
209- $ symfonyRoutes = $ this ->addToSymfonyRoutesCollection ($ symfonyRoutes , $ route );
207+ foreach ($ this ->getRoutes () as $ route ) {
208+ if ($ route ->isFallback ) {
209+ $ fallbackRoutes [] = $ route ;
210+
211+ continue ;
210212 }
213+
214+ $ symfonyRoutes = $ this ->addToSymfonyRoutesCollection ($ symfonyRoutes , $ route );
211215 }
212216
213- foreach ($ routes as $ route ) {
214- if ($ route ->isFallback ) {
215- $ symfonyRoutes = $ this ->addToSymfonyRoutesCollection ($ symfonyRoutes , $ route );
216- }
217+ foreach ($ fallbackRoutes as $ route ) {
218+ $ symfonyRoutes = $ this ->addToSymfonyRoutesCollection ($ symfonyRoutes , $ route );
217219 }
218220
219221 return $ symfonyRoutes ;
You can’t perform that action at this time.
0 commit comments