From e354e86236b571c44dabc3d9fdb259677fc39471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20B=C3=BClter?= Date: Fri, 20 Dec 2024 11:45:44 +0100 Subject: [PATCH] [TASK] Make sure TSFE is set before accessing --- ChangeLog | 1 + Classes/Lib/SearchHelper.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 25f7d7230..963bd0694 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ Upcoming version [BUGFIX] Make it possible to have multiple "orderBy" parts in the search result query in TYPO3 13 [TASK] Add special treatment for the ke_search_premium "Custom Ranking" feature in the search result query "orderBy" part [TASK] Make it possible to add "having" in the search result query +[TASK] Make sure TSFE is set before accessing Version 6.1.2, 15 November 2024 [BUGFIX] Fix regression which required a startingpoint to be always set. https://github.com/tpwd/ke_search/issues/257 diff --git a/Classes/Lib/SearchHelper.php b/Classes/Lib/SearchHelper.php index 9dd878e0d..46a0743e7 100644 --- a/Classes/Lib/SearchHelper.php +++ b/Classes/Lib/SearchHelper.php @@ -370,7 +370,7 @@ public static function searchLink(int $parameter, array $piVars = [], $resetFilt { // If no cObj is available we cannot render the link. // This might be the case if the current request is headless (ke_search_premium feature). - if (!$GLOBALS['TSFE']->cObj) { + if (!isset($GLOBALS['TSFE']) || !isset($GLOBALS['TSFE']->cObj)) { return ''; }