From 91c1a310feab5a12613716b3e742c66d6d29f79c Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 18 Jul 2014 11:14:57 +0000 Subject: [PATCH] avoid warning on unexpected accounts->memberships result --- phpgwapi/inc/class.preferences.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.preferences.inc.php b/phpgwapi/inc/class.preferences.inc.php index 58b9453c3f..45b1da1a91 100644 --- a/phpgwapi/inc/class.preferences.inc.php +++ b/phpgwapi/inc/class.preferences.inc.php @@ -412,7 +412,7 @@ class preferences if ($this->account_id > 0) { $primary_group = accounts::id2name($this->account_id, 'account_primary_group'); - foreach($GLOBALS['egw']->accounts->memberships($this->account_id, true) as $gid) + foreach((array)$GLOBALS['egw']->accounts->memberships($this->account_id, true) as $gid) { if ($gid != $primary_group) $to_read[] = $gid + self::DEFAULT_ID; // need to offset it with DEFAULT_ID = -2! }