diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-03-02 21:55:51 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-02 21:55:51 -0600 |
commit | 8e9b119c5f5fdb574f2e2e2284fd506ed2257629 (patch) | |
tree | e7d1fb57e511b6acba463e890a04f3252083701f /apps | |
parent | b55ce43ba5f8e05cba5e0ee3b6923c2329047ca9 (diff) | |
parent | 8f289286a7d1e4e6ada10e1cf63b962ade6bcaa4 (diff) | |
download | nextcloud-server-8e9b119c5f5fdb574f2e2e2284fd506ed2257629.tar.gz nextcloud-server-8e9b119c5f5fdb574f2e2e2284fd506ed2257629.zip |
Merge pull request #3681 from nextcloud/dav-nonexisting-owner
handle non existing owners when handling dav requests
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/FilesPlugin.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 5e401b88481..2f86ce5bf41 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -317,12 +317,19 @@ class FilesPlugin extends ServerPlugin { $propFind->handle(self::OWNER_ID_PROPERTYNAME, function() use ($node) { $owner = $node->getOwner(); - return $owner->getUID(); + if (!$owner) { + return null; + } else { + return $owner->getUID(); + } }); $propFind->handle(self::OWNER_DISPLAY_NAME_PROPERTYNAME, function() use ($node) { $owner = $node->getOwner(); - $displayName = $owner->getDisplayName(); - return $displayName; + if (!$owner) { + return null; + } else { + return $owner->getDisplayName(); + } }); $propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) { |