From 1a9007b7602ba7feeeffffb9be2cb9ac17593d7e Mon Sep 17 00:00:00 2001 From: Steffen Gebert <steffen.gebert@typo3.org> Date: Sun, 17 Jul 2011 13:46:25 +0200 Subject: [PATCH] [BUGFIX] Wrong check for existance of translated label While tslib_fe::getLL() checks the existance of a translated label with isset(), language::getLLL() does this with a strict string comparison. This is evaluated as TRUE, if the subkey is not set at all, which is an unexpected behavior. Thus check, whether the label was translated into the current language using isset(). Change-Id: I421d541d9aeaa2403052d212c7adba819a4e116f Resolves: #28264 Releases: 4.6 Reviewed-on: http://review.typo3.org/3380 Reviewed-by: Xavier Perseguers Reviewed-by: Stanislas Rolland Tested-by: Stanislas Rolland Reviewed-by: Georg Ringer Tested-by: Georg Ringer Reviewed-by: Steffen Gebert Tested-by: Steffen Gebert --- typo3/sysext/lang/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/lang/lang.php b/typo3/sysext/lang/lang.php index 36f196eb3f47..214f1e608067 100755 --- a/typo3/sysext/lang/lang.php +++ b/typo3/sysext/lang/lang.php @@ -291,7 +291,7 @@ class language { */ public function getLL($index, $hsc = FALSE) { // Get Local Language - if ($GLOBALS['LOCAL_LANG'][$this->lang][$index][0]['target'] !== '') { + if (isset($GLOBALS['LOCAL_LANG'][$this->lang][$index][0]['target'])) { $output = $GLOBALS['LOCAL_LANG'][$this->lang][$index][0]['target']; } else { $output = $GLOBALS['LOCAL_LANG']['default'][$index][0]['target']; -- GitLab