diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-10-21 16:58:59 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-11-23 09:28:58 +0100 |
commit | 008b79d808b7d5f42c0e6072e021ac8fde72d3aa (patch) | |
tree | 7acc8998503c895f72b043c3042767d6db3141b1 | |
parent | 3a1b3745eb8e43eaa830bdeb9fe53a2de70349f0 (diff) | |
download | nextcloud-server-008b79d808b7d5f42c0e6072e021ac8fde72d3aa.tar.gz nextcloud-server-008b79d808b7d5f42c0e6072e021ac8fde72d3aa.zip |
Fix type errors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | lib/private/Collaboration/Collaborators/UserPlugin.php | 2 | ||||
-rw-r--r-- | lib/private/User/Database.php | 9 |
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; } } |