From ed13cd3e55e1e927b0adbc832accb385c0962caf Mon Sep 17 00:00:00 2001 From: Philipp Kitzberger Date: Fri, 6 Oct 2023 12:28:35 +0200 Subject: [PATCH] FIX: page module dead in offline mode --- Classes/Service/DeeplService.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Classes/Service/DeeplService.php b/Classes/Service/DeeplService.php index 4afa7882..ebe6a9a0 100644 --- a/Classes/Service/DeeplService.php +++ b/Classes/Service/DeeplService.php @@ -55,8 +55,10 @@ public function __construct( $objectManager = GeneralUtility::makeInstance(ObjectManager::class); $this->deeplSettingsRepository = $objectManager->get(SettingsRepository::class); - $this->loadSupportedLanguages(); - $this->apiSupportedLanguages['target'] = $this->deeplSettingsRepository->getSupportedLanguages($this->apiSupportedLanguages['target']); + if (DeeplBackendUtility::isDeeplApiKeySet()) { + $this->loadSupportedLanguages(); + $this->apiSupportedLanguages['target'] = $this->deeplSettingsRepository->getSupportedLanguages($this->apiSupportedLanguages['target']); + } } /**