From 2690422d684f1aca9f1442b8b8f43ae4c784729a Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 21 Aug 2016 07:44:32 +0200 Subject: [PATCH] Fix issue with caches and deleted users in UserListBoxController --- .../files/lib/system/box/UserListBoxController.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/lib/system/box/UserListBoxController.class.php b/wcfsetup/install/files/lib/system/box/UserListBoxController.class.php index bc81384a36..fe07ef3ea1 100644 --- a/wcfsetup/install/files/lib/system/box/UserListBoxController.class.php +++ b/wcfsetup/install/files/lib/system/box/UserListBoxController.class.php @@ -104,6 +104,11 @@ class UserListBoxController extends AbstractDatabaseObjectListBoxController { if ($this->userIDs !== null) { $userProfiles = UserProfileRuntimeCache::getInstance()->getObjects($this->userIDs); + // filter `null` values of users that have been deleted in the meantime + $userProfiles = array_filter($userProfiles, function($userProfile) { + return $userProfile !== null; + }); + DatabaseObject::sort($userProfiles, $this->sortField, $this->sortOrder); } -- 2.20.1