mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 06:08:46 -04:00
fix: add extra check to ensure wrapped shared storage is set
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
d5fa2ec7c3
commit
85b5dd0a43
1 changed files with 10 additions and 0 deletions
|
|
@ -569,6 +569,16 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue