Issue Bug Closed

#99190PHP Warning: Undefined array key 1 in /typo3/sysext/core/Classes/Localization/LanguageService.php line 240

Tee Ohh 11/25/22, 11:34 updated 12/06/22, 21:43

Description

If I have a translation file for CSH with an translation unit id without a dot, the TYPO3 backend throws a warning. I know that this translation unit id is wrong, but before PHP 8.1 it just didn’t show the CSH.
*Warning*

PHP Warning: Undefined array key 1 in /typo3/sysext/core/Classes/Localization/LanguageService.php line 240

Example

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
    <file source-language="en" datatype="plaintext" original="messages" date="2022-11-25T12:30:00Z" product-name="my_ext_key">
        <header/>
        <body>
            <trans-unit id="my_field.description">
                <source>This works</source>
            </trans-unit>
            <trans-unit id="my_field">
                <source>This failed</source>
            </trans-unit>
        </body>
    </file>
</xliff>

Reviews 1