Skip to content

Commit

Permalink
BUGFIX: SSF-124 filter on a value only if this value is not an empty …
Browse files Browse the repository at this point in the history
…string
  • Loading branch information
normann committed Apr 11, 2012
1 parent bfb81fb commit 3d05666
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/controllers/CMSSiteTreeFilter.php
Expand Up @@ -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':
Expand Down

0 comments on commit 3d05666

Please sign in to comment.