aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/SharedStorage.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php
index 877de247fb1..d5c264def3b 100644
--- a/apps/files_sharing/lib/SharedStorage.php
+++ b/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;
}