Skip to content
This repository
Browse code

BUGFIX: SSF-124 filter on a value only if this value is not an empty …

…string
  • Loading branch information...
commit 3d0566638a74323f817c1e790bacc90d5ef96571 1 parent bfb81fb
Normann Lou authored

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

  1. 2  code/controllers/CMSSiteTreeFilter.php
2  code/controllers/CMSSiteTreeFilter.php
@@ -185,7 +185,7 @@ function pagesIncluded() {
185 185
 			switch($name) {
186 186
 				// Match against URLSegment, Title, MenuTitle & Content
187 187
 				case 'Term':
188  
-					$where[] = "\"URLSegment\" LIKE '%$val%' OR \"Title\" LIKE '%$val%' OR \"MenuTitle\" LIKE '%$val%' OR \"Content\" LIKE '%$val%'";
  188
+					if($val) $where[] = "\"URLSegment\" LIKE '%$val%' OR \"Title\" LIKE '%$val%' OR \"MenuTitle\" LIKE '%$val%' OR \"Content\" LIKE '%$val%'";
189 189
 					break;
190 190
 				// Match against date
191 191
 				case 'LastEditedFrom':

0 notes on commit 3d05666

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