Project

General

Profile

Actions

Bug #91345

closed

Extbase LocalizationUtility generates error if site language is null

Added by Ronny Hauptvogel over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
Start date:
2020-05-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The extbase localization utility (TYPO3\CMS\Extbase\Utility\LocalizationUtility) generates an error if the site language is null.

Line 196: $siteLanguage = self::getCurrentSiteLanguage();

Sometimes site language will be null here.

Line 199: $languageKeys['languageKey'] = $siteLanguage->getTypo3Language();

function call on null will generate an exception.

So line 199 should be:

if ($siteLanguage) {
$languageKeys['languageKey'] = $siteLanguage->getTypo3Language();
}

Actions

Also available in: Atom PDF