From 6a0c622a6d513edc23c6a8c62106bc30965231c5 Mon Sep 17 00:00:00 2001 From: Malte Riechmann Date: Tue, 27 Feb 2024 10:48:31 +0100 Subject: [PATCH] refactor: if there is no index, no exception is thrown anymore --- Classes/Service/SearchService.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Classes/Service/SearchService.php b/Classes/Service/SearchService.php index c258c26..3780e2e 100644 --- a/Classes/Service/SearchService.php +++ b/Classes/Service/SearchService.php @@ -27,13 +27,6 @@ public function search(string $query, string $sorting = 'crdate_desc', array $ty return $result; } - // Do not try to search when caching is disabled - // We might have no index ready and an exception - // would occur - if ($GLOBALS['TSFE']->no_cache === true) { - return $result; - } - [$sortingColumn, $sortingDesc] = explode('_', $sorting); foreach ($types as $type) {