forked from extern/egroupware
API: Make sure memberships is an array to avoid other errors (PHP 8.0)
This commit is contained in:
parent
0bac2ff1e8
commit
a794adfcf2
@ -986,7 +986,7 @@ class Accounts
|
||||
}
|
||||
if ($account_id && ($data = self::cache_read($account_id)))
|
||||
{
|
||||
$ret = $just_id && $data['memberships'] ? array_keys($data['memberships']) : $data['memberships'];
|
||||
$ret = $just_id && $data['memberships'] ? array_keys($data['memberships']) : ($data['memberships'] ?? []);
|
||||
}
|
||||
//error_log(__METHOD__."($account_id, $just_id) data=".array2string($data)." returning ".array2string($ret));
|
||||
return $ret ?? [];
|
||||
|
Loading…
Reference in New Issue
Block a user