Skip to content

Commit 939e736

Browse files
joshtrichardskesselb
authored andcommitted
Catch more invalid cache source storage paths
OC\Files\Cache\Cache::get can return string|false|null, not just string|false. - #26270 added handling of false, but null is needed too. - Well, or we change the default $resullt to false, but I'm not sure if that has other ramifications and the real need here is to simply catch situations where the cache source storage path is not valid for whatever reason Related: #19009 Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
1 parent 35ff1de commit 939e736

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/Files/Cache/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) {
660660
$targetPath = $this->normalize($targetPath);
661661

662662
$sourceData = $sourceCache->get($sourcePath);
663-
if ($sourceData === false) {
663+
if ($sourceData === false || $sourceData === null) {
664664
throw new \Exception('Invalid source storage path: ' . $sourcePath);
665665
}
666666

0 commit comments

Comments
 (0)