MINOR Accept null values in SearchContext->getResults()

This commit is contained in:
Ingo Schommer 2012-03-02 13:41:25 +01:00
parent b95abeedc6
commit 9a381d8393

View File

@ -162,7 +162,7 @@ class SearchContext extends Object {
* @return SS_List
*/
public function getResults($searchParams, $sort = false, $limit = false) {
$searchParams = array_filter($searchParams, array($this,'clearEmptySearchFields'));
$searchParams = array_filter((array)$searchParams, array($this,'clearEmptySearchFields'));
// getQuery actually returns a DataList
return $this->getQuery($searchParams, $sort, $limit);