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

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/44357/head
Robin Appelman 8 months ago
parent d5fa2ec7c3
commit 85b5dd0a43
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
  1. 10
      apps/files_sharing/lib/SharedStorage.php

@ -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…
Cancel
Save