[FrameworkBundle] Router skip defaults resolution for arrays

This commit is contained in:
Antoine Hérault 2012-11-06 16:30:03 +01:00
parent 3d99374014
commit 208e134945
2 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ class Router extends BaseRouter implements WarmableInterface
{
$container = $this->container;
if (null === $value || false === $value || true === $value || is_object($value)) {
if (null === $value || false === $value || true === $value || is_object($value) || is_array($value)) {
return $value;
}

View File

@ -163,7 +163,7 @@ class RoutingTest extends \PHPUnit_Framework_TestCase
public function getNonStringValues()
{
return array(array(null), array(false), array(true), array(new \stdClass()), array(array('foo', 'bar')));
return array(array(null), array(false), array(true), array(new \stdClass()), array(array('foo', 'bar')), array(array(array())));
}
private function getServiceContainer(RouteCollection $routes)