Skip to content

Commit 1c23bb1

Browse files
committed
fix: add extra check to ensure wrapped shared storage is set
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent d5fa2ec commit 1c23bb1

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

apps/files_sharing/lib/SharedStorage.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,13 @@ public function getSourceStorage() {
569569

570570
public function getWrapperStorage() {
571571
$this->init();
572+
573+
if (!$this->storage) {
574+
$message = "no storage set after init for share " . $this->getShareId();
575+
$this->logger->error($message);
576+
$this->storage = new FailedStorage(['exception' => new \Exception($message)]);
577+
}
578+
572579
return $this->storage;
573580
}
574581

0 commit comments

Comments
 (0)