mirror of
https://github.com/nextcloud/server.git
synced 2025-03-13 07:53:51 +00:00
Catch more invalid cache source storage paths
OC\Files\Cache\Cache::get can return string|false|null, not just string|false. - nextcloud/server#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: nextcloud/server#19009 Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
This commit is contained in:
parent
e4260cd855
commit
c4505160a0
1 changed files with 1 additions and 1 deletions
|
@ -663,7 +663,7 @@ class Cache implements ICache {
|
|||
$targetPath = $this->normalize($targetPath);
|
||||
|
||||
$sourceData = $sourceCache->get($sourcePath);
|
||||
if ($sourceData === false) {
|
||||
if ($sourceData === false || $sourceData === null) {
|
||||
throw new \Exception('Invalid source storage path: ' . $sourcePath);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue