From: Jan Schneider Date: Thu, 3 Jun 2010 12:03:10 +0000 (+0200) Subject: It helps to actually check whether there are groups. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a6d2f20c818c4904b4d75e7703f4ace5147f91d6;p=horde.git It helps to actually check whether there are groups. --- diff --git a/framework/Ajax/lib/Horde/Ajax/Application/Base.php b/framework/Ajax/lib/Horde/Ajax/Application/Base.php index d68c0b6ad..f4d11ab41 100644 --- a/framework/Ajax/lib/Horde/Ajax/Application/Base.php +++ b/framework/Ajax/lib/Horde/Ajax/Application/Base.php @@ -139,8 +139,10 @@ abstract class Horde_Ajax_Application_Base $groups = empty($GLOBALS['conf']['share']['any_group']) ? $horde_groups->getGroupMemberships($GLOBALS['registry']->getAuth(), true) : $horde_groups->listGroups(); - asort($groups); - $result->groups = $groups; + if ($groups) { + asort($groups); + $result->groups = $groups; + } } catch (Horde_Group_Exception $e) { } return $result; }