diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php b/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php index 29f3072a89..fa07f832f8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php +++ b/src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php @@ -85,7 +85,7 @@ class DelegatingLoader extends BaseDelegatingLoader $this->loading = false; foreach ($collection->all() as $route) { - if (!$controller = $route->getDefault('_controller')) { + if (!is_string($controller = $route->getDefault('_controller')) || !$controller) { continue; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml index 57d83eb9c6..11b85a86d3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml @@ -44,3 +44,7 @@ fragment_home: fragment_inlined: path: /fragment_inlined defaults: { _controller: TestBundle:Fragment:inlined } + +array_controller: + path: /array_controller + defaults: { _controller: [ArrayController, someAction] }