fix(cache): filter out invalid entries in OC\Files\Cache\Wrapper\CacheWrapper::getFolderContentsById

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2026-02-12 14:53:55 +01:00
parent 560df4a73c
commit 88bb82ccfe
No known key found for this signature in database
GPG key ID: 7E849AE05218500F
2 changed files with 1 additions and 6 deletions

View file

@ -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>

View file

@ -104,7 +104,7 @@ class CacheWrapper extends Cache {
*/
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));
}
/**