mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
Merge pull request #58379 from nextcloud/backport/58285/master
fix(cache): filter out invalid entries in `OC\Files\Cache\Wrapper\CacheWrapper::getFolderContentsById`
This commit is contained in:
commit
252449023f
2 changed files with 3 additions and 8 deletions
|
|
@ -3509,11 +3509,6 @@
|
|||
<code><![CDATA[self::getGlobalCache()->getStorageInfo($storageId)]]></code>
|
||||
</NullableReturnStatement>
|
||||
</file>
|
||||
<file src="lib/private/Files/Cache/Wrapper/CacheWrapper.php">
|
||||
<LessSpecificImplementedReturnType>
|
||||
<code><![CDATA[array]]></code>
|
||||
</LessSpecificImplementedReturnType>
|
||||
</file>
|
||||
<file src="lib/private/Files/Config/MountProviderCollection.php">
|
||||
<InvalidOperand>
|
||||
<code><![CDATA[$user]]></code>
|
||||
|
|
|
|||
|
|
@ -97,14 +97,14 @@ class CacheWrapper extends Cache {
|
|||
}
|
||||
|
||||
/**
|
||||
* get the metadata of all files stored in $folder
|
||||
* Get the metadata of all files stored in given folder
|
||||
*
|
||||
* @param int $fileId the file id of the folder
|
||||
* @return array
|
||||
* @return ICacheEntry[]
|
||||
*/
|
||||
public function getFolderContentsById(int $fileId, ?string $mimeTypeFilter = null) {
|
||||
$results = $this->getCache()->getFolderContentsById($fileId, $mimeTypeFilter);
|
||||
return array_map($this->formatCacheEntry(...), $results);
|
||||
return array_filter(array_map($this->formatCacheEntry(...), $results));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue