diff options
author | Robin Appelman <robin@icewind.nl> | 2017-03-02 15:26:00 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-03-02 15:26:00 +0100 |
commit | 8f289286a7d1e4e6ada10e1cf63b962ade6bcaa4 (patch) | |
tree | c6229b7c90de55f33ea0e1bfb00ce2c04c04d44a /apps | |
parent | aecec74a04160cb8a1d67540f3663ea40f49a873 (diff) | |
download | nextcloud-server-8f289286a7d1e4e6ada10e1cf63b962ade6bcaa4.tar.gz nextcloud-server-8f289286a7d1e4e6ada10e1cf63b962ade6bcaa4.zip |
handle non existing owners when handling dav requests
Signed-off-by: Robin Appelman <robin@icewind.nl>
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) { |