From: Hypolite Petovan Date: Tue, 24 Dec 2019 22:17:27 +0000 (-0500) Subject: Move search term emptiness check before content checks in Search\Index X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1c9cb42d98b3792d70b0a081003d0912dcc62037;p=friendica.git Move search term emptiness check before content checks in Search\Index --- 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...