From a34f7ccba4a3189dcef5454c2ff5236ba290dfb2 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Fri, 9 Mar 2012 18:12:14 +1300 Subject: [PATCH] BUGFIX: Fixed SearchContext::getQuery() to avoid use of deprecated limit() call signature. --- search/SearchContext.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/search/SearchContext.php b/search/SearchContext.php index 282fdd911..b9306aa98 100644 --- a/search/SearchContext.php +++ b/search/SearchContext.php @@ -124,7 +124,9 @@ class SearchContext extends Object { $query = DataList::create($this->modelClass); } - $query->limit($limit); + if(is_array($limit)) $query->limit(isset($limit['limit']) ? $limit['limit'] : null, isset($limit['start']) ? $limit['start'] : null); + else $query->limit($limit); + $query->sort($sort); // hack to work with $searchParems when it's an Object