avoid warning on unexpected accounts->memberships result

This commit is contained in:
Klaus Leithoff 2014-07-18 11:15:46 +00:00
parent 22bb1a71b0
commit 1010d327d3

View File

@ -348,7 +348,7 @@ class preferences
if ($this->account_id > 0) if ($this->account_id > 0)
{ {
$primary_group = accounts::id2name($this->account_id, 'account_primary_group'); $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! if ($gid != $primary_group) $to_read[] = $gid + self::DEFAULT_ID; // need to offset it with DEFAULT_ID = -2!
} }