[BUGFIX] Make sure that language key is set in extbase.
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Utility / LocalizationUtility.php
index 2c4e194..6246473 100644 (file)
@@ -206,8 +206,10 @@ class LocalizationUtility
                     }
                 }
             }
-        } elseif ($GLOBALS['BE_USER']->uc['lang'] !== '') {
+        } elseif (!empty($GLOBALS['BE_USER']->uc['lang'])) {
             self::$languageKey = $GLOBALS['BE_USER']->uc['lang'];
+        } elseif (!empty(self::getLanguageService()->lang)) {
+            self::$languageKey = self::getLanguageService()->lang;
         }
     }