From: Matthias Schmidt Date: Sun, 21 Aug 2016 05:44:32 +0000 (+0200) Subject: Fix issue with caches and deleted users in UserListBoxController X-Git-Tag: 3.0.0_Beta_1~634 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2690422d684f1aca9f1442b8b8f43ae4c784729a;p=GitHub%2FWoltLab%2FWCF.git Fix issue with caches and deleted users in UserListBoxController --- 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); }