diff --git a/typo3/sysext/lang/Classes/Domain/Repository/LanguageRepository.php b/typo3/sysext/lang/Classes/Domain/Repository/LanguageRepository.php index 9afbde889afcd481293648923b165233e919ba04..c6b5bf99053344055959e81a36f90f983c07decb 100644 --- a/typo3/sysext/lang/Classes/Domain/Repository/LanguageRepository.php +++ b/typo3/sysext/lang/Classes/Domain/Repository/LanguageRepository.php @@ -85,11 +85,10 @@ class LanguageRepository */ public function __construct() { - $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class); - try { - $globalSettings = $configurationManager->getLocalConfigurationValueByPath($this->configurationPath); - $this->selectedLocales = (array)$globalSettings['availableLanguages']; - } catch (\Exception $e) { + if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lang']['availableLanguages'])) { + $this->selectedLocales = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lang']['availableLanguages']; + } else { + $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class); $configurationManager->setLocalConfigurationValueByPath( $this->configurationPath, ['availableLanguages' => []]