diff options
author | provokateurin <kate@provokateurin.de> | 2024-09-16 16:00:46 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-09-17 10:10:50 +0200 |
commit | dc13f9cc1e3d8dce1c18d2c7920afe99b7bfa475 (patch) | |
tree | add5fe8603a640c5621655f9364c1291c53a9b18 /apps/files_versions | |
parent | 8ca6fcace7dc22230a7afe84936ca01470f50d00 (diff) | |
download | nextcloud-server-dc13f9cc1e3d8dce1c18d2c7920afe99b7bfa475.tar.gz nextcloud-server-dc13f9cc1e3d8dce1c18d2c7920afe99b7bfa475.zip |
fix(Files): Handle getOwner() returning falsefix/storage/get-owner-false
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'apps/files_versions')
-rw-r--r-- | apps/files_versions/lib/Versions/LegacyVersionsBackend.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_versions/lib/Versions/LegacyVersionsBackend.php b/apps/files_versions/lib/Versions/LegacyVersionsBackend.php index fc37ecead95..bc46da85752 100644 --- a/apps/files_versions/lib/Versions/LegacyVersionsBackend.php +++ b/apps/files_versions/lib/Versions/LegacyVersionsBackend.php @@ -49,6 +49,10 @@ class LegacyVersionsBackend implements IVersionBackend, IDeletableVersionBackend if ($storage->instanceOfStorage(ISharedStorage::class)) { $owner = $storage->getOwner(''); + if ($owner === false) { + throw new NotFoundException('No owner for ' . $file->getPath()); + } + $user = $this->userManager->get($owner); $fileId = $file->getId(); |