Skip to content

Commit

Permalink
return early if an empty search is attempted
Browse files Browse the repository at this point in the history
  • Loading branch information
rossriley committed Nov 9, 2018
1 parent f518f54 commit bd823de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Storage/Query/Handler/SearchQueryHandler.php
Expand Up @@ -32,6 +32,11 @@ public function __invoke(ContentQueryParser $contentQuery)
$query->setContentType($contentType);

$searchParam = $contentQuery->getParameter('filter');
/** If we have an empty search filter then we need to return early */
if (empty($searchParam)) {
return $set;
}

$query->setParameters($contentQuery->getParameters());
$query->setSearch($searchParam);

Expand Down

0 comments on commit bd823de

Please sign in to comment.