]> source.dussan.org Git - nextcloud-server.git/commitdiff
Actually check if the owner is not null 19978/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Mon, 16 Mar 2020 12:12:10 +0000 (13:12 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Mon, 16 Mar 2020 12:12:10 +0000 (13:12 +0100)
Else this can error out on storages that do not have an owner (e.g.
groupfolders).

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/Files/View.php

index 90ac1e1988d360ddbdaf8f024b781d33936b5e92..8ea94626a2aaaf012918f1107443478f9fe8f5aa 100644 (file)
@@ -1687,6 +1687,11 @@ class View {
                if (!$info) {
                        throw new NotFoundException($path . ' not found while trying to get owner');
                }
+
+               if ($info->getOwner() === null) {
+                       throw new NotFoundException($path . ' has no owner');
+               }
+
                return $info->getOwner()->getUID();
        }