Fixed exception caused by deleted users in cache
authorMarcel Werk <burntime@woltlab.com>
Tue, 17 Jan 2017 19:34:08 +0000 (20:34 +0100)
committerMarcel Werk <burntime@woltlab.com>
Tue, 17 Jan 2017 19:35:46 +0000 (20:35 +0100)
wcfsetup/install/files/lib/system/box/WhoWasOnlineBoxController.class.php

index 919b5f416dfce6fc4eed84083eeda792bab4dc54..c5d7152e12f5a6089256af277f843fcb38498208 100644 (file)
@@ -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)) {