Browse Source

handle non existing owners when handling dav requests

Signed-off-by: Robin Appelman <robin@icewind.nl>
tags/v12.0.0beta1
Robin Appelman 7 years ago
parent
commit
8f289286a7
No account linked to committer's email address
1 changed files with 10 additions and 3 deletions
  1. 10
    3
      apps/dav/lib/Connector/Sabre/FilesPlugin.php

+ 10
- 3
apps/dav/lib/Connector/Sabre/FilesPlugin.php View File

@@ -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) {

Loading…
Cancel
Save