[TYPO3-core] FYI: Fixed bug #10742: LOCAL_LANG default values are overwritten by localized text
Oliver Hader
oliver at typo3.org
Fri Mar 20 21:31:42 CET 2009
Forgot the patch...
Oliver Hader schrieb:
> The following changes were committed to SVN:
> * TYPO3_4-2 (rev. 5212)
> * Trunk (rev. 5213)
>
> Type: Bugfix
>
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=10742
>
> Branches: TYPO3_4-2, Trunk
>
> Problem:
> The situation:
> * running TYPO3 in frontend with defined language (e.g. config.language=de)
> * running the frontend with something different to utf-8 (e.g. iso-8859-1)
> * requesting a non-translated label in your extension
> * having the following labels in locallang.xml file:
> + default
> + label_1: first
> + label_2: second
> + label_3: third
> + de
> + label_1: first translated to german
>
> If you now request "label_3" by e.g. tslib_pibase::pi_getLL('label_3')
> in your extension, you get "first translated to german" instead of "third".
>
> Solution:
> The reason for that misbehaviour is a reference in a foreach iteration
> that converts the default labels from utf-8 to the target charset.
> The reference on $labelValue gets reused when the non-default labels
> (e.g. for the german language in "de") are processed - thus, "label_3"
> gets overridden with the first item of the german labels.
> Removing the reference by calling an unset() solves this issue (it does
> not destroy the content of the reference but removes the reference).
>
> Notes:
> Thanks to Mathias Gisch for pointing this out and providing a patch for
> this bug!
> I committed this as FYI since it's a nobrainer. Furthermore I checked
> all other references used in iterations in t3lib_div and could not find
> any other issues like this. Of course I tested the patch...
>
>
> olly
--
Oliver Hader
TYPO3 Release Manager 4.3
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0010742.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090320/746a5e44/attachment.txt
More information about the TYPO3-team-core
mailing list