From: mutec Date: Tue, 10 Aug 2021 10:06:27 +0000 (+0200) Subject: use the sessions language id instead of the user's default in `I18nDatabaseObjectList` X-Git-Tag: 5.4.4~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=48f835b92cecce69bda2bd02c1ab3fe866a04dc3;p=GitHub%2FWoltLab%2FWCF.git use the sessions language id instead of the user's default in `I18nDatabaseObjectList` `WCF::getUser()->languageID` doesn't return a valid language id as integer in every case. Additionally we (normally) want to use a specific language or the session's language - which might be different from the user's default in some moments. see #4407 --- diff --git a/wcfsetup/install/files/lib/data/I18nDatabaseObjectList.class.php b/wcfsetup/install/files/lib/data/I18nDatabaseObjectList.class.php index 4ae5d98aeb..cd278ed921 100644 --- a/wcfsetup/install/files/lib/data/I18nDatabaseObjectList.class.php +++ b/wcfsetup/install/files/lib/data/I18nDatabaseObjectList.class.php @@ -39,7 +39,7 @@ abstract class I18nDatabaseObjectList extends DatabaseObjectList parent::__construct(); if ($languageID === null) { - $languageID = WCF::getUser()->languageID; + $languageID = WCF::getLanguage()->languageID; } if (!empty($this->i18nFields)) {