]> source.dussan.org Git - nextcloud-server.git/commitdiff
Actually check if the owner is not null 20202/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Mon, 16 Mar 2020 12:12:10 +0000 (13:12 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Fri, 27 Mar 2020 13:51:47 +0000 (13:51 +0000)
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 2c01c112ad4ee3198b9f8315b52e62319e0a10a2..9aaa37feee955d1ab8f4ee0756038d8a8f46b5a0 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();
        }