From: Alexander Ebert Date: Mon, 15 Dec 2014 15:53:48 +0000 (+0100) Subject: Work-around for PHP 5.3.3 randomly failing in uasort() X-Git-Tag: 2.1.0_Beta_2~33 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=729f537ac617e9f43ee99e6aeac65ca9d3ec4f48;p=GitHub%2FWoltLab%2FWCF.git Work-around for PHP 5.3.3 randomly failing in uasort() --- 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()); });