diff options
-rw-r--r-- | lib/private/Group/Database.php | 16 | ||||
-rw-r--r-- | lib/public/Group/Backend/IBatchMethodsBackend.php | 8 |
2 files changed, 12 insertions, 12 deletions
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(); diff --git a/lib/public/Group/Backend/IBatchMethodsBackend.php b/lib/public/Group/Backend/IBatchMethodsBackend.php index 109f398677f..2af00e42825 100644 --- a/lib/public/Group/Backend/IBatchMethodsBackend.php +++ b/lib/public/Group/Backend/IBatchMethodsBackend.php @@ -48,13 +48,13 @@ interface IBatchMethodsBackend { /** * @brief Batch method to get the group details of a list of groups * - * The default implementation in ABackend will just call getGroupDetail in - * a loop. But a GroupBackend implementation should provides a more optimized - * override this method to provide a more optimized way to execute this operation. + * The default implementation in ABackend will just call getGroupDetails in + * a loop. But a GroupBackend implementation should override this method + * to provide a more optimized way to execute this operation. * * @throw \RuntimeException if called on a backend that doesn't implements IGroupDetailsBackend * - * @return array<string, array{displayName: string}> + * @return array<string, array{displayName?: string}> * @since 28.0.0 */ public function getGroupsDetails(array $gids): array; |