Skip to content

Commit

Permalink
made a small tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Aug 3, 2015
1 parent f7b25a2 commit 6679a4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Silex/ControllerCollection.php
Expand Up @@ -205,10 +205,10 @@ private function doFlush($prefix, RouteCollection $routes)
if ($controller instanceof Controller) {
$controller->getRoute()->setPath($prefix.$controller->getRoute()->getPath());
if (!$name = $controller->getRouteName()) {
$name = $controller->generateRouteName('');
$name = $base = $controller->generateRouteName('');
$i = 0;
while ($routes->get($name)) {
$name = $controller->generateRouteName('').'_'.++$i;
$name = $base.'_'.++$i;
}
$controller->bind($name);
}
Expand Down

0 comments on commit 6679a4e

Please sign in to comment.