fix(collaboration): collaboration MailPlugin: Protect access to a potentially missing array component by ??.

Signed-off-by: Claus-Justus Heine <himself@claus-justus-heine.de>
This commit is contained in:
Claus-Justus Heine 2022-02-01 12:47:57 +01:00 committed by skjnldsv
parent 455a209b9c
commit 493333036b
1 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ class MailPlugin implements ISearchPlugin {
}
if ($exactEmailMatch && $this->shareeEnumerationFullMatch) {
try {
$cloud = $this->cloudIdManager->resolveCloudId($contact['CLOUD'][0]);
$cloud = $this->cloudIdManager->resolveCloudId($contact['CLOUD'][0] ?? '');
} catch (\InvalidArgumentException $e) {
continue;
}
@ -174,7 +174,7 @@ class MailPlugin implements ISearchPlugin {
if ($this->shareeEnumeration) {
try {
$cloud = $this->cloudIdManager->resolveCloudId($contact['CLOUD'][0]);
$cloud = $this->cloudIdManager->resolveCloudId($contact['CLOUD'][0] ?? '');
} catch (\InvalidArgumentException $e) {
continue;
}