[BUGFIX] htmlArea RTE: Target of localized string may be empty
authorStanislas Rolland <typo3@sjbr.ca>
Mon, 13 Feb 2012 19:40:34 +0000 (14:40 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Mon, 13 Feb 2012 20:05:32 +0000 (21:05 +0100)
Solution: Do not allow an empty localized string to overrule the
default string.

Change-Id: I5b270b7b2888f5ff5d087ed2b65c9e5a55f17f30
Fixes: #33897
Releases: 4.5, 4.6, 4.7
Reviewed-on: http://review.typo3.org/9017
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php

index 434c824..eff6b33 100644 (file)
@@ -1111,7 +1111,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                foreach ($labelsArray as $labels => $subArray) {
                        $LOCAL_LANG = t3lib_div::readLLfile('EXT:' . $this->ID . '/htmlarea/locallang_' . $labels . '.xml', $this->language, 'utf-8');
                        if (!empty($LOCAL_LANG[$this->language])) {
-                               $LOCAL_LANG[$this->language] = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG['default'], $LOCAL_LANG[$this->language]);
+                               $LOCAL_LANG[$this->language] = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG['default'], $LOCAL_LANG[$this->language], FALSE, FALSE);
                        } else {
                                $LOCAL_LANG[$this->language] = $LOCAL_LANG['default'];
                        }
@@ -1240,7 +1240,7 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                $JSLanguageArray = 'HTMLArea.I18N["' . $plugin . '"] = new Object();' . $linebreak;
                if (is_array($LOCAL_LANG)) {
                        if (!empty($LOCAL_LANG[$this->language])) {
-                               $LOCAL_LANG[$this->language] = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG['default'],$LOCAL_LANG[$this->language]);
+                               $LOCAL_LANG[$this->language] = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG['default'], $LOCAL_LANG[$this->language], FALSE, FALSE);
                        } else {
                                $LOCAL_LANG[$this->language] = $LOCAL_LANG['default'];
                        }