From 9a381d8393f96b1105cdfb1cc0588ed6a548afc4 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 2 Mar 2012 13:41:25 +0100 Subject: [PATCH] MINOR Accept null values in SearchContext->getResults() --- search/SearchContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search/SearchContext.php b/search/SearchContext.php index 8836ba8d6..d28985a6b 100644 --- a/search/SearchContext.php +++ b/search/SearchContext.php @@ -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);