Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a69c1b2

Browse files
[FrameworkBundle] Fix Routing\DelegatingLoader
1 parent a40c94d commit a69c1b2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function load($resource, $type = null)
8585
$this->loading = false;
8686

8787
foreach ($collection->all() as $route) {
88-
if (!$controller = $route->getDefault('_controller')) {
88+
if (!is_string($controller = $route->getDefault('_controller')) || !$controller) {
8989
continue;
9090
}
9191

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,7 @@ fragment_home:
4444
fragment_inlined:
4545
path: /fragment_inlined
4646
defaults: { _controller: TestBundle:Fragment:inlined }
47+
48+
array_controller:
49+
path: /array_controller
50+
defaults: { _controller: [ArrayController, someAction] }

0 commit comments

Comments
 (0)