From: Roeland Jago Douma Date: Mon, 16 Mar 2020 12:12:10 +0000 (+0100) Subject: Actually check if the owner is not null X-Git-Tag: v19.0.0beta1~94^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F19978%2Fhead;p=nextcloud-server.git Actually check if the owner is not null Else this can error out on storages that do not have an owner (e.g. groupfolders). Signed-off-by: Roeland Jago Douma --- diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 90ac1e1988d..8ea94626a2a 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -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(); }