mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 22:27:31 -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
f867a2d65e
commit
bbda231e18
1 changed files with 2 additions and 2 deletions
|
|
@ -617,8 +617,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