Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 normann authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  code/controllers/CMSSiteTreeFilter.php
View
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%'";
break;
// Match against date
case 'LastEditedFrom':
Please sign in to comment.
Something went wrong with that request. Please try again.