summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache/Wrapper/CacheWrapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Cache/Wrapper/CacheWrapper.php')
-rw-r--r--lib/private/Files/Cache/Wrapper/CacheWrapper.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Files/Cache/Wrapper/CacheWrapper.php b/lib/private/Files/Cache/Wrapper/CacheWrapper.php
index 8b8b4b6af80..e5300dc75f5 100644
--- a/lib/private/Files/Cache/Wrapper/CacheWrapper.php
+++ b/lib/private/Files/Cache/Wrapper/CacheWrapper.php
@@ -60,7 +60,7 @@ class CacheWrapper extends Cache {
* Make it easy for wrappers to modify every returned cache entry
*
* @param ICacheEntry $entry
- * @return ICacheEntry
+ * @return ICacheEntry|false
*/
protected function formatCacheEntry($entry) {
return $entry;
@@ -311,7 +311,8 @@ class CacheWrapper extends Cache {
public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry {
$rawEntry = $this->getCache()->getCacheEntryFromSearchResult($rawEntry);
if ($rawEntry) {
- return $this->formatCacheEntry(clone $rawEntry);
+ $entry = $this->formatCacheEntry(clone $rawEntry);
+ return $entry ?: null;
}
return null;