From 4900d6d92a80a2c2538bf75061d50c9938d8a869 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Thu, 24 Apr 2014 08:39:23 +0200 Subject: [PATCH] support false for no limit as well --- Doctrine/Orm/RouteProvider.php | 2 +- Doctrine/Phpcr/RouteProvider.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); }