Skip to content

Commit

Permalink
fix: add extra check to ensure wrapped shared storage is set
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Mar 20, 2024
1 parent d5fa2ec commit 85b5dd0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/files_sharing/lib/SharedStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,16 @@ public function getSourceStorage() {

public function getWrapperStorage() {
$this->init();

/**
* @psalm-suppress DocblockTypeContradiction
*/
if (!$this->storage) {
$message = "no storage set after init for share " . $this->getShareId();
$this->logger->error($message);
$this->storage = new FailedStorage(['exception' => new \Exception($message)]);
}

return $this->storage;
}

Expand Down

0 comments on commit 85b5dd0

Please sign in to comment.