mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(dav): check if principal has email address before accessing it
Ref https://github.com/nextcloud/calendar/issues/4811 Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
parent
fb3261a062
commit
6728b4b30b
1 changed files with 2 additions and 2 deletions
|
|
@ -601,8 +601,8 @@ class Principal implements BackendInterface {
|
|||
public function getEmailAddressesOfPrincipal(array $principal): array {
|
||||
$emailAddresses = [];
|
||||
|
||||
if (($primaryAddress = $principal['{http://sabredav.org/ns}email-address'])) {
|
||||
$emailAddresses[] = $primaryAddress;
|
||||
if (isset($principal['{http://sabredav.org/ns}email-address'])) {
|
||||
$emailAddresses[] = $principal['{http://sabredav.org/ns}email-address'];
|
||||
}
|
||||
|
||||
if (isset($principal['{DAV:}alternate-URI-set'])) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue