Skip to content
Browse files

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

  • Loading branch information...
1 parent bfb81fb commit 3d0566638a74323f817c1e790bacc90d5ef96571 @normann normann committed Apr 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 code/controllers/CMSSiteTreeFilter.php
2 code/controllers/CMSSiteTreeFilter.php
@@ -185,7 +185,7 @@ function pagesIncluded() {
switch($name) {
// Match against URLSegment, Title, MenuTitle & Content
case 'Term':
- $where[] = "\"URLSegment\" LIKE '%$val%' OR \"Title\" LIKE '%$val%' OR \"MenuTitle\" LIKE '%$val%' OR \"Content\" LIKE '%$val%'";
+ if($val) $where[] = "\"URLSegment\" LIKE '%$val%' OR \"Title\" LIKE '%$val%' OR \"MenuTitle\" LIKE '%$val%' OR \"Content\" LIKE '%$val%'";
// Match against date
case 'LastEditedFrom':

0 comments on commit 3d05666

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