Skip to content

Commit

Permalink
Fix sharing and around three errors related to Undefined array key "C…
Browse files Browse the repository at this point in the history
…LOUD"

We try to access $contact['CLOUD'] when it might not be set. As a consequence of that 3 PHP errors are generated the last one being an uncaught exception that makes it impossible to share files locally.

This patch adds a simple check to ensure the value exists before using it.

Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <[email protected]>
  • Loading branch information
klondi authored Sep 1, 2023
1 parent e2303d0 commit c97c906
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Collaboration/Collaborators/MailPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function search($search, $limit, $offset, ISearchResult $searchResult) {
return false;
}

if ($this->shareeEnumeration) {
if ($this->shareeEnumeration && isset($contact['CLOUD'])) {
try {
$cloud = $this->cloudIdManager->resolveCloudId($contact['CLOUD'][0]);
} catch (\InvalidArgumentException $e) {
Expand Down

0 comments on commit c97c906

Please sign in to comment.