From 35069ad86a96923b0e39c897bb839058de4b4b34 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 5 Sep 2023 12:08:10 +0200 Subject: Fix psalm spotted type errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/private/Group/Database.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/private/Group') diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php index 4cfc3c1f45a..20e56a03d0a 100644 --- a/lib/private/Group/Database.php +++ b/lib/private/Group/Database.php @@ -359,11 +359,11 @@ class Database extends ABackend implements ->where($qb->expr()->in('gid', $qb->createNamedParameter($chunk, IQueryBuilder::PARAM_STR_ARRAY))) ->executeQuery(); while ($row = $result->fetch()) { - $this->groupCache[$row['gid']] = [ - 'displayname' => $row['displayname'], - 'gid' => $row['gid'], + $this->groupCache[(string)$row['gid']] = [ + 'displayname' => (string)$row['displayname'], + 'gid' => (string)$row['gid'], ]; - $existingGroups[] = $gid; + $existingGroups[] = (string)$row['gid']; } $result->closeCursor(); } @@ -553,10 +553,10 @@ class Database extends ABackend implements $result = $query->executeQuery(); while ($row = $result->fetch()) { - $details[$row['gid']] = ['displayName' => $row['displayname']]; - $this->groupCache[$row['gid']] = [ - 'displayname' => $row['displayname'], - 'gid' => $row['gid'], + $details[(string)$row['gid']] = ['displayName' => (string)$row['displayname']]; + $this->groupCache[(string)$row['gid']] = [ + 'displayname' => (string)$row['displayname'], + 'gid' => (string)$row['gid'], ]; } $result->closeCursor(); -- cgit v1.2.3