From 1018eb441117274a790e03456ddbe7cf12848b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ty=C3=A1s=20Jani?= Date: Tue, 17 Aug 2021 15:10:38 +0200 Subject: [PATCH] Fix SQL type error Fixing the following SQL error encountered with PostgreSQL: SQLSTATE[42883]: Undefined function: 7 ERROR: No operator matches the given name and argument types. You might need to add explicit type casts. This prevented the Nextcloud apps/files page to show the files and directories. See #27881 --- lib/private/Comments/Manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php index b20e028dcabea..21caf6823f88e 100644 --- a/lib/private/Comments/Manager.php +++ b/lib/private/Comments/Manager.php @@ -656,7 +656,7 @@ public function getNumberOfUnreadCommentsForObjects(string $objectType, array $o $unreadComments = array_fill_keys($objectIds, 0); foreach (array_chunk($objectIds, 1000) as $chunk) { - $query->setParameter('ids', $chunk, IQueryBuilder::PARAM_INT_ARRAY); + $query->setParameter('ids', $chunk, IQueryBuilder::PARAM_STR_ARRAY); $result = $query->executeQuery(); while ($row = $result->fetch()) {