Skip to content
This repository
Browse code

MINOR Accept null values in SearchContext->getResults()

  • Loading branch information...
commit 9a381d8393f96b1105cdfb1cc0588ed6a548afc4 1 parent b95abee
Ingo Schommer authored March 02, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  search/SearchContext.php
2  search/SearchContext.php
@@ -162,7 +162,7 @@ public function getQuery($searchParams, $sort = false, $limit = false, $existing
162 162
 	 * @return SS_List
163 163
 	 */
164 164
 	public function getResults($searchParams, $sort = false, $limit = false) {
165  
-		$searchParams = array_filter($searchParams, array($this,'clearEmptySearchFields'));
  165
+		$searchParams = array_filter((array)$searchParams, array($this,'clearEmptySearchFields'));
166 166
 
167 167
 		// getQuery actually returns a DataList
168 168
 		return $this->getQuery($searchParams, $sort, $limit);

1 note on commit 9a381d8

Sam Minnée
Owner

Good.

Please sign in to comment.
Something went wrong with that request. Please try again.