Skip to content

Commit 3634916

Browse files
committed
Fixed ORM provider getRouteByName returning an array instead of single route instance.
1 parent 2dc5b9d commit 3634916

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doctrine/Orm/RouteProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected function getCandidates($url)
5757
*/
5858
public function getRouteByName($name, $parameters = array())
5959
{
60-
$route = $this->getRoutesRepository()->findBy(array('name' => $name));
60+
$route = $this->getRoutesRepository()->findOneBy(array('name' => $name));
6161
if (!$route) {
6262
throw new RouteNotFoundException("No route found for name '$name'");
6363
}

0 commit comments

Comments
 (0)