diff --git a/src/Symfony/Component/Routing/RouteCollection.php b/src/Symfony/Component/Routing/RouteCollection.php index ec6f4afc29..40fe1e6602 100644 --- a/src/Symfony/Component/Routing/RouteCollection.php +++ b/src/Symfony/Component/Routing/RouteCollection.php @@ -275,7 +275,7 @@ class RouteCollection implements \IteratorAggregate, \Countable */ public function setHostnamePattern($pattern) { - foreach ($this->routes as $name => $route) { + foreach ($this->routes as $route) { $route->setHostnamePattern($pattern); } }