From 1c9cb42d98b3792d70b0a081003d0912dcc62037 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 24 Dec 2019 17:17:27 -0500 Subject: [PATCH] Move search term emptiness check before content checks in Search\Index --- src/Module/Search/Index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Module/Search/Index.php b/src/Module/Search/Index.php index 8921c07aa6..691fc3ec89 100644 --- a/src/Module/Search/Index.php +++ b/src/Module/Search/Index.php @@ -82,6 +82,10 @@ class Index extends BaseSearchModule '$content' => HTML::search($search, 'search-box', false) ]); + if (!$search) { + return $o; + } + if (strpos($search, '#') === 0) { $tag = true; $search = substr($search, 1); @@ -115,10 +119,6 @@ class Index extends BaseSearchModule } } - if (!$search) { - return $o; - } - $tag = $tag || Config::get('system', 'only_tag_search'); // Here is the way permissions work in the search module...