diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2023-02-07 18:55:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-07 18:55:03 +0100 |
commit | 7c6a41488d2995f9af4b844dda64b53ba02904c3 (patch) | |
tree | 8f6e01d7317963082298b4bad97e095859fbcd8e | |
parent | 9a2167d3ef8eefe7d15e27e001ad697e65c69e3c (diff) | |
parent | 6728b4b30b204f8e1e9fc6f663d7ac35d770af1f (diff) | |
download | nextcloud-server-7c6a41488d2995f9af4b844dda64b53ba02904c3.tar.gz nextcloud-server-7c6a41488d2995f9af4b844dda64b53ba02904c3.zip |
Merge pull request #36386 from nextcloud/backport/36210/stable24
[stable24] fix(dav): check if principal has email address before accessing it
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Principal.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php index c1ad2535936..2a110e928ad 100644 --- a/apps/dav/lib/Connector/Sabre/Principal.php +++ b/apps/dav/lib/Connector/Sabre/Principal.php @@ -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'])) { |