Skip to content

Commit 85b5dd0

Browse files
committed
fix: add extra check to ensure wrapped shared storage is set
Signed-off-by: Robin Appelman <[email protected]>
1 parent d5fa2ec commit 85b5dd0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

apps/files_sharing/lib/SharedStorage.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,16 @@ public function getSourceStorage() {
569569

570570
public function getWrapperStorage() {
571571
$this->init();
572+
573+
/**
574+
* @psalm-suppress DocblockTypeContradiction
575+
*/
576+
if (!$this->storage) {
577+
$message = "no storage set after init for share " . $this->getShareId();
578+
$this->logger->error($message);
579+
$this->storage = new FailedStorage(['exception' => new \Exception($message)]);
580+
}
581+
572582
return $this->storage;
573583
}
574584

0 commit comments

Comments
 (0)