diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-10-16 23:33:52 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-10-16 23:33:52 +0200 |
commit | d4d1952f673aa21eaa3a99817a762685a77c2e16 (patch) | |
tree | 9b546bb19841c5fec9ebe21578b4b33e271e2bbc /apps/files_external/lib/Command/Notify.php | |
parent | a40ca520d4036049de12f48c62d42c6aeaf7160a (diff) | |
download | nextcloud-server-d4d1952f673aa21eaa3a99817a762685a77c2e16.tar.gz nextcloud-server-d4d1952f673aa21eaa3a99817a762685a77c2e16.zip |
Fix return value of updateParent
Port to executeStatement to guarantee that we will return an int and
remove a deprecated method call at the same time
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/files_external/lib/Command/Notify.php')
-rw-r--r-- | apps/files_external/lib/Command/Notify.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/files_external/lib/Command/Notify.php b/apps/files_external/lib/Command/Notify.php index 91bbd6d3354..2e3ade7df7a 100644 --- a/apps/files_external/lib/Command/Notify.php +++ b/apps/files_external/lib/Command/Notify.php @@ -292,20 +292,15 @@ class Notify extends Base { ->fetchAll(); } - /** - * @param array $storageIds - * @param string $parent - * @return int - */ - private function updateParent($storageIds, $parent) { - $pathHash = md5(trim(\OC_Util::normalizeUnicode($parent), '/')); + private function updateParent(array $storageIds, string $parent): int { + $pathHash = md5(trim((string)\OC_Util::normalizeUnicode($parent), '/')); $qb = $this->connection->getQueryBuilder(); return $qb ->update('filecache') ->set('size', $qb->createNamedParameter(-1, IQueryBuilder::PARAM_INT)) ->where($qb->expr()->in('storage', $qb->createNamedParameter($storageIds, IQueryBuilder::PARAM_INT_ARRAY, ':storage_ids'))) ->andWhere($qb->expr()->eq('path_hash', $qb->createNamedParameter($pathHash, IQueryBuilder::PARAM_STR))) - ->execute(); + ->executeStatement(); } private function reconnectToDatabase(IDBConnection $connection, OutputInterface $output): IDBConnection { |