Merge pull request #20203 from nextcloud/backport/19978/stable17

[stable17] Actually check if the owner is not null
This commit is contained in:
Roeland Jago Douma 2020-04-01 09:50:09 +02:00 committed by GitHub
commit 0d872d81f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1685,6 +1685,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();
}