From: Matthias Schmidt Date: Sat, 21 Jul 2012 10:51:09 +0000 (+0200) Subject: Fixes User::getLanguageIDs() X-Git-Tag: 2.0.0_Beta_1~980^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cd76084606740a941edea3d09893f9345cefd2d4;p=GitHub%2FWoltLab%2FWCF.git Fixes User::getLanguageIDs() Currently, if there are no entries in wcfN_user_to_language for a registered user (like when a user was created via ACP), the stored value is NULL instead of an empty array. --- diff --git a/wcfsetup/install/files/lib/data/user/User.class.php b/wcfsetup/install/files/lib/data/user/User.class.php index 0a56052dab..ffcaa962aa 100644 --- a/wcfsetup/install/files/lib/data/user/User.class.php +++ b/wcfsetup/install/files/lib/data/user/User.class.php @@ -150,10 +150,9 @@ final class User extends DatabaseObject implements IRouteController { */ public function getLanguageIDs() { if ($this->languageIDs === null) { - if (!$this->userID) { - $this->languageIDs = array(); - } - else { + $this->languageIDs = array(); + + if ($this->userID) { // load storage data UserStorageHandler::getInstance()->loadStorage(array($this->userID));