From 729f537ac617e9f43ee99e6aeac65ca9d3ec4f48 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 15 Dec 2014 16:53:48 +0100 Subject: [PATCH] Work-around for PHP 5.3.3 randomly failing in uasort() --- .../install/files/lib/acp/form/UserOptionListForm.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/lib/acp/form/UserOptionListForm.class.php b/wcfsetup/install/files/lib/acp/form/UserOptionListForm.class.php index d304f6347a..96b8f07f2d 100644 --- a/wcfsetup/install/files/lib/acp/form/UserOptionListForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserOptionListForm.class.php @@ -32,6 +32,11 @@ abstract class UserOptionListForm extends AbstractOptionListForm { protected function getAvailableGroups() { $userGroups = UserGroup::getAccessibleGroups(array(), array(UserGroup::GUESTS, UserGroup::EVERYONE, UserGroup::USERS)); + // work-around for PHP 5.3.3 randomly failing in uasort() + foreach ($userGroups as $userGroup) { + $userGroup->getName(); + } + uasort($userGroups, function(UserGroup $groupA, UserGroup $groupB) { return strcmp($groupA->getName(), $groupB->getName()); }); -- 2.20.1