From dc13f9cc1e3d8dce1c18d2c7920afe99b7bfa475 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Mon, 16 Sep 2024 16:00:46 +0200 Subject: fix(Files): Handle getOwner() returning false Signed-off-by: provokateurin --- apps/dav/lib/Storage/PublicOwnerWrapper.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'apps/dav/lib') diff --git a/apps/dav/lib/Storage/PublicOwnerWrapper.php b/apps/dav/lib/Storage/PublicOwnerWrapper.php index 40ef81ab06d..91c1916dc39 100644 --- a/apps/dav/lib/Storage/PublicOwnerWrapper.php +++ b/apps/dav/lib/Storage/PublicOwnerWrapper.php @@ -12,8 +12,7 @@ use OC\Files\Storage\Wrapper\Wrapper; class PublicOwnerWrapper extends Wrapper { - /** @var string */ - private $owner; + private string $owner; /** * @param array $arguments ['storage' => $storage, 'owner' => $owner] @@ -28,11 +27,10 @@ class PublicOwnerWrapper extends Wrapper { public function getOwner($path): string|false { $owner = parent::getOwner($path); - - if ($owner === null || $owner === false) { - return $this->owner; + if ($owner !== false) { + return $owner; } - return $owner; + return $this->owner; } } -- cgit v1.2.3