From: Marcel Werk Date: Wed, 1 Feb 2017 16:53:51 +0000 (+0100) Subject: Fixed usage of disabled languages X-Git-Tag: 3.0.2~32 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5b8eae2c3ac1bb1b58c1f4040f08b6f9f0ab7407;p=GitHub%2FWoltLab%2FWCF.git Fixed usage of disabled languages --- diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index 987c1ae0ba..1127cb54cb 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -657,7 +657,9 @@ class WCF { * @param integer $languageID */ public static final function setLanguage($languageID) { - if (!$languageID) $languageID = LanguageFactory::getInstance()->getDefaultLanguageID(); + if (!$languageID || LanguageFactory::getInstance()->getLanguage($languageID) === null) { + $languageID = LanguageFactory::getInstance()->getDefaultLanguageID(); + } self::$languageObj = LanguageFactory::getInstance()->getLanguage($languageID); self::getTPL()->setLanguageID(self::getLanguage()->languageID);