diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-03-22 20:43:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 20:43:34 +0100 |
commit | fb97d551a1a3ca79942668009a48ca100ac92eaa (patch) | |
tree | 5d06b065a65daeb8eb1b75cb6255e3d3d945a5fe /apps | |
parent | ddb84f9738957368232e587e76c0d64804777c16 (diff) | |
parent | 85b5dd0a4325672c8dcef82df04a2c0306a4fb5b (diff) | |
download | nextcloud-server-fb97d551a1a3ca79942668009a48ca100ac92eaa.tar.gz nextcloud-server-fb97d551a1a3ca79942668009a48ca100ac92eaa.zip |
Merge pull request #44357 from nextcloud/wrapper-instanceof-resiliant
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/SharedStorage.php | 10 |
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; } |