[FrameworkBundle] Fix Routing\DelegatingLoader

This commit is contained in:
Nicolas Grekas 2017-09-24 11:20:06 +02:00
parent a40c94d8e3
commit a69c1b2ae1
2 changed files with 5 additions and 1 deletions

View File

@ -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;
}

View File

@ -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] }