From b5ae644575fb9dc9e100d509b93c0bf08767231b Mon Sep 17 00:00:00 2001 From: Florian Heinze Date: Tue, 2 May 2023 16:01:41 +0200 Subject: [PATCH] BUGFIX: prevent array from being passed to ConfigurationHelper --- Classes/Eel/Helper/CookiePunchConfig.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Classes/Eel/Helper/CookiePunchConfig.php b/Classes/Eel/Helper/CookiePunchConfig.php index f630b2d..868a967 100644 --- a/Classes/Eel/Helper/CookiePunchConfig.php +++ b/Classes/Eel/Helper/CookiePunchConfig.php @@ -17,7 +17,10 @@ public function translate($path): ?string { if ($path) { $settingsValue = (new ConfigurationHelper())->setting($path); - if ($settingsValue) { + // we need to prevent an array to be passed to the TranslationHelper + // this can happen when we e.g. try to translate "Sandstorm", which will + // return the corresponding yaml config + if ($settingsValue && is_string($settingsValue)) { return (new TranslationHelper())->translate($settingsValue); } else { return (new TranslationHelper())->translate($path);