fix: add extra check to ensure wrapped shared storage is set

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/44420/head
Robin Appelman 2 months ago committed by backportbot[bot]
parent e2eb5eec3c
commit 93dc9fca32

@ -529,6 +529,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…
Cancel
Save