Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[BUGFIX] Prevent null pointer exception in LocalizationUtility
Resolves: #91345
Releases: master
Change-Id: I54ab67e85b3bf24b06916b674765ed22fb5de76c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64508
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Josef Glatz <josefglatz@gmail.com>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Josef Glatz <josefglatz@gmail.com>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
  • Loading branch information
o-ba authored and ervaude committed May 21, 2020
1 parent 2f2cfff commit 7971bc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php
Expand Up @@ -196,7 +196,9 @@ protected static function getLanguageKeys(): array
$siteLanguage = self::getCurrentSiteLanguage();

// Get values from site language
$languageKeys['languageKey'] = $siteLanguage->getTypo3Language();
if ($siteLanguage !== null) {
$languageKeys['languageKey'] = $siteLanguage->getTypo3Language();
}

$locales = GeneralUtility::makeInstance(Locales::class);
if (in_array($languageKeys['languageKey'], $locales->getLocales())) {
Expand Down

0 comments on commit 7971bc9

Please sign in to comment.