diff --git a/Doctrine/Orm/RouteProvider.php b/Doctrine/Orm/RouteProvider.php index 2b365e4e..71ff9fb9 100644 --- a/Doctrine/Orm/RouteProvider.php +++ b/Doctrine/Orm/RouteProvider.php @@ -92,7 +92,7 @@ public function getRoutesByNames($names = null) return array(); } - return $this->getRouteRepository()->findBy(array(), null, $this->routeCollectionLimit); + return $this->getRouteRepository()->findBy(array(), null, $this->routeCollectionLimit ?: null); } $routes = array(); diff --git a/Doctrine/Phpcr/RouteProvider.php b/Doctrine/Phpcr/RouteProvider.php index 4cdb12c5..155e1e5c 100644 --- a/Doctrine/Phpcr/RouteProvider.php +++ b/Doctrine/Phpcr/RouteProvider.php @@ -156,7 +156,7 @@ private function getAllRoutes() $this->candidatesStrategy->restrictQuery($qb); $query = $qb->getQuery(); - if (null !== $this->routeCollectionLimit) { + if ($this->routeCollectionLimit) { $query->setMaxResults($this->routeCollectionLimit); }