aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Collaboration/Collaborators/UserPlugin.php2
-rw-r--r--lib/private/User/Database.php9
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php
index 9ed94082f0d..1c00bb26c94 100644
--- a/lib/private/Collaboration/Collaborators/UserPlugin.php
+++ b/lib/private/Collaboration/Collaborators/UserPlugin.php
@@ -178,7 +178,7 @@ class UserPlugin implements ISearchPlugin {
$this->shareeEnumerationFullMatch &&
$lowerSearch !== '' && (strtolower($uid) === $lowerSearch ||
strtolower($userDisplayName) === $lowerSearch ||
- strtolower($userEmail) === $lowerSearch)
+ strtolower($userEmail ?? '') === $lowerSearch)
) {
if (strtolower($uid) === $lowerSearch) {
$foundUserById = true;
diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php
index 5dfc74163a7..81094d4d8af 100644
--- a/lib/private/User/Database.php
+++ b/lib/private/User/Database.php
@@ -386,13 +386,14 @@ class Database extends ABackend implements
$row = $result->fetch();
$result->closeCursor();
- $this->cache[$uid] = false;
-
// "uid" is primary key, so there can only be a single result
if ($row !== false) {
- $this->cache[$uid]['uid'] = (string)$row['uid'];
- $this->cache[$uid]['displayname'] = (string)$row['displayname'];
+ $this->cache[$uid] = [
+ 'uid' => (string)$row['uid'],
+ 'displayname' => (string)$row['displayname'],
+ ];
} else {
+ $this->cache[$uid] = false;
return false;
}
}