From 222a08222fcfac2c09ca238630d26b93afcd23fb Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 22 Jul 2015 09:57:52 +0930 Subject: [PATCH] Don't run gambits if there's no search query --- framework/core/src/Core/Search/GambitManager.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/core/src/Core/Search/GambitManager.php b/framework/core/src/Core/Search/GambitManager.php index 39f410a47..f38afee38 100644 --- a/framework/core/src/Core/Search/GambitManager.php +++ b/framework/core/src/Core/Search/GambitManager.php @@ -86,6 +86,10 @@ class GambitManager { $bits = $this->explode($query); + if (! $bits) { + return ''; + } + $gambits = array_map([$this->container, 'make'], $this->gambits); foreach ($bits as $k => $bit) {