From 92263ae3759dc0f5a2471f666e71757e3cf56c88 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 17 Jan 2017 20:34:08 +0100 Subject: [PATCH] Fixed exception caused by deleted users in cache --- .../files/lib/system/box/WhoWasOnlineBoxController.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/box/WhoWasOnlineBoxController.class.php b/wcfsetup/install/files/lib/system/box/WhoWasOnlineBoxController.class.php index 919b5f416d..c5d7152e12 100644 --- a/wcfsetup/install/files/lib/system/box/WhoWasOnlineBoxController.class.php +++ b/wcfsetup/install/files/lib/system/box/WhoWasOnlineBoxController.class.php @@ -97,7 +97,9 @@ class WhoWasOnlineBoxController extends AbstractDatabaseObjectListBoxController WhoWasOnlineCacheBuilder::getInstance()->reset(); } - $this->users = UserProfileRuntimeCache::getInstance()->getObjects($userIDs); + $this->users = array_filter(UserProfileRuntimeCache::getInstance()->getObjects($userIDs), function($user) { + return $user !== null; + }); foreach ($this->users as $key => $user) { // remove invisible users if (!UsersOnlineList::isVisible($user->userID, $user->canViewOnlineStatus)) { -- 2.20.1