Skip to content

Commit c3b20ea

Browse files
committed
fix(files): Don't try to use missing cache entries
The `Cache::get()` function can return `ICacheEntry` or `false`. Added check ensures that `false` return value is not used as an array. This silences: `Trying to access array offset on value of type bool` errors. Signed-off-by: Jacek Tomasiak <jacek.tomasiak@gmail.com>
1 parent 1af3a66 commit c3b20ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/private/Files/Cache/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ public function correctFolderSize($path, $data = null, $isBackgroundScan = false
870870
}
871871
if ($isBackgroundScan) {
872872
$parentData = $this->get($parent);
873-
if ($parentData['size'] !== -1 && $this->getIncompleteChildrenCount($parentData['fileid']) === 0) {
873+
if ($parentData !== false && $parentData['size'] !== -1 && $this->getIncompleteChildrenCount($parentData['fileid']) === 0) {
874874
$this->correctFolderSize($parent, $parentData, $isBackgroundScan);
875875
}
876876
} else {

0 commit comments

Comments
 (0)