From cd76084606740a941edea3d09893f9345cefd2d4 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 21 Jul 2012 12:51:09 +0200 Subject: [PATCH] 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. --- wcfsetup/install/files/lib/data/user/User.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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)); -- 2.20.1