Skip to content
Snippets Groups Projects
Commit eb19b7d4 authored by Christian Kuhn's avatar Christian Kuhn Committed by Stefan Neufeind
Browse files

[FOLLOWUP][TASK] Deprecate GeneralUtility:readLLfile

ExtensionManager fatals since the parserFactory object is
not always instantiated as expected.

Resolves: #68122
Releases: master
Change-Id: Ibc1ad2ac4df76b80b529c45ab5c1bf83115abf69
Reviewed-on: http://review.typo3.org/41240


Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
parent 974344ac
No related merge requests found
......@@ -407,6 +407,13 @@ class LanguageService {
* @return array value of $LOCAL_LANG found in the included file, empty if non found
*/
protected function readLLfile($fileRef) {
// @todo: Usually, an instance of the LocalizationFactory is found in $this->parserFactory.
// @todo: This is not the case if $GLOBALS['LANG'] is not used to get hold of this object,
// @todo: but the objectManager instead. If then init() is not called, this will fatal ...
// @todo: To be sure, we always create an instance here for now.
/** @var $languageFactory LocalizationFactory */
$languageFactory = GeneralUtility::makeInstance(LocalizationFactory::class);
if ($this->lang !== 'default') {
$languages = array_reverse($this->languageDependencies);
} else {
......@@ -414,7 +421,7 @@ class LanguageService {
}
$localLanguage = array();
foreach ($languages as $language) {
$tempLL = $this->parserFactory->getParsedData($fileRef, $language, $this->charSet);
$tempLL = $languageFactory->getParsedData($fileRef, $language, $this->charSet);
$localLanguage['default'] = $tempLL['default'];
if (!isset($localLanguage[$this->lang])) {
$localLanguage[$this->lang] = $localLanguage['default'];
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment