Actions
Bug #41450
closedPHP Error when languagePackIndex is empty
Status:
Closed
Priority:
Should have
Assignee:
Category:
Language Manager (backend)
Target version:
-
Start date:
2012-09-28
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
I tried to update the language packs and got this PHP error:
Fatal error: Cannot use string offset as an array in typo3/sysext/lang/Classes/Controller/LanguageController.php on line 208
The problem occurs, if the languagePackIndex is empty (see http://ter.rz.tu-clausthal.de/ter/c/o/core-l10n/core-l10n.xml for example):
<?xml version="1.0" standalone="yes" ?> <TERlanguagePackIndex> <meta> <timestamp>1348788881</timestamp> <date>2012-09-28 01:34:41</date> </meta> <languagePackIndex> </languagePackIndex> </TERlanguagePackIndex>
The problem is in the XML parser in TYPO3\CMS\Lang\Utility\Connection\Ter::parseL10nXML($string)
. It will fill the tag with a string containing the space / linebreaks between the two languagePackIndex XML tags. The isset() check in TYPO3\CMS\Lang\Controller\LanguageController::checkTranslationForExtension($languages, $extensionKey)
therefore returns TRUE which results in the error above.
Actions