Skip to content

Commit

Permalink
BUGFIX: Fixed SearchContext::getQuery() to avoid use of deprecated li…
Browse files Browse the repository at this point in the history
…mit() call signature.
  • Loading branch information
Sam Minnee committed Mar 9, 2012
1 parent 3768483 commit a34f7cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion search/SearchContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ public function getQuery($searchParams, $sort = false, $limit = false, $existing
$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
Expand Down

0 comments on commit a34f7cc

Please sign in to comment.