Skip to content

Commit a3afe2f

Browse files
committed
Merge pull request #243 from symfony-cmf/route-collection-limit-config
support false for no limit as well
2 parents fce8e56 + 4900d6d commit a3afe2f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Doctrine/Orm/RouteProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function getRoutesByNames($names = null)
9292
return array();
9393
}
9494

95-
return $this->getRouteRepository()->findBy(array(), null, $this->routeCollectionLimit);
95+
return $this->getRouteRepository()->findBy(array(), null, $this->routeCollectionLimit ?: null);
9696
}
9797

9898
$routes = array();

Doctrine/Phpcr/RouteProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private function getAllRoutes()
156156
$this->candidatesStrategy->restrictQuery($qb);
157157

158158
$query = $qb->getQuery();
159-
if (null !== $this->routeCollectionLimit) {
159+
if ($this->routeCollectionLimit) {
160160
$query->setMaxResults($this->routeCollectionLimit);
161161
}
162162

0 commit comments

Comments
 (0)