From: Marcel Werk Date: Tue, 17 Jan 2017 19:34:08 +0000 (+0100) Subject: Fixed exception caused by deleted users in cache X-Git-Tag: 3.0.1~18 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=92263ae3759dc0f5a2471f666e71757e3cf56c88;p=GitHub%2FWoltLab%2FWCF.git Fixed exception caused by deleted users in cache --- 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)) {