diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php index c139f36953007..ca54133a24319 100644 --- a/lib/private/Files/Cache/QuerySearchHelper.php +++ b/lib/private/Files/Cache/QuerySearchHelper.php @@ -193,7 +193,7 @@ public function searchInCaches(ISearchQuery $searchQuery, array $caches): array $files = $result->fetchAll(); $rawEntries = array_map(function (array $data) use ($metadataQuery) { - $data['metadata'] = $metadataQuery->extractMetadata($data)?->asArray() ?? []; + $data['metadata'] = $metadataQuery->extractMetadata($data)->asArray(); return Cache::cacheEntryFromData($data, $this->mimetypeLoader); }, $files); diff --git a/lib/private/FilesMetadata/Service/MetadataRequestService.php b/lib/private/FilesMetadata/Service/MetadataRequestService.php index bdb50812b9489..a6de6e8025aa2 100644 --- a/lib/private/FilesMetadata/Service/MetadataRequestService.php +++ b/lib/private/FilesMetadata/Service/MetadataRequestService.php @@ -58,7 +58,7 @@ public function store(IFilesMetadata $filesMetadata): void { ->setValue('file_id', $qb->createNamedParameter($filesMetadata->getFileId(), IQueryBuilder::PARAM_INT)) ->setValue('json', $qb->createNamedParameter(json_encode($filesMetadata->jsonSerialize()))) ->setValue('sync_token', $qb->createNamedParameter($this->generateSyncToken())) - ->setValue('last_update', $qb->createFunction('NOW()')); + ->setValue(column: 'last_update', value: $qb->createFunction('NOW()')); $qb->executeStatement(); } diff --git a/lib/public/FilesMetadata/IFilesMetadataManager.php b/lib/public/FilesMetadata/IFilesMetadataManager.php index a854506815d77..7ba8cac795a24 100644 --- a/lib/public/FilesMetadata/IFilesMetadataManager.php +++ b/lib/public/FilesMetadata/IFilesMetadataManager.php @@ -131,6 +131,7 @@ public function getKnownMetadata(): IFilesMetadata; * * @param string $key metadata key * @param string $type metadata type + * @since 28.0.0 */ public function initMetadataIndex(string $key, string $type): void; } diff --git a/lib/public/FilesMetadata/Model/IMetadataQuery.php b/lib/public/FilesMetadata/Model/IMetadataQuery.php index 90c86b3439dfc..3e68b47f822f1 100644 --- a/lib/public/FilesMetadata/Model/IMetadataQuery.php +++ b/lib/public/FilesMetadata/Model/IMetadataQuery.php @@ -86,5 +86,4 @@ public function getMetadataKeyField(string $metadataKey): string; * @since 28.0.0 */ public function getMetadataValueField(string $metadataKey): string; - }