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 backportbot[bot]
parent f7470ab973
commit 7300db7e9b

View file

@ -140,7 +140,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;
}
@ -165,7 +165,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;
}