From: Jan Schneider Date: Thu, 3 Jun 2010 11:59:38 +0000 (+0200) Subject: Don't set groups property if there aren't any. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=189bdd21639fe7d6dd61767e48ccec971e0bee3c;p=horde.git Don't set groups property if there aren't any. --- diff --git a/framework/Ajax/lib/Horde/Ajax/Application/Base.php b/framework/Ajax/lib/Horde/Ajax/Application/Base.php index 4049ccd49..d68c0b6ad 100644 --- a/framework/Ajax/lib/Horde/Ajax/Application/Base.php +++ b/framework/Ajax/lib/Horde/Ajax/Application/Base.php @@ -133,19 +133,15 @@ abstract class Horde_Ajax_Application_Base */ public function listGroups() { + $result = new stdClass; try { $horde_groups = Horde_Group::singleton(); $groups = empty($GLOBALS['conf']['share']['any_group']) ? $horde_groups->getGroupMemberships($GLOBALS['registry']->getAuth(), true) : $horde_groups->listGroups(); asort($groups); - } catch (Horde_Group_Exception $e) { - $groups = array(); - } - - $result = new stdClass; - $result->groups = $groups; - + $result->groups = $groups; + } catch (Horde_Group_Exception $e) { } return $result; }