Browse Source

properly catch exceptions of detailsCircle

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
tags/v16.0.0beta1
Georg Ehrke 5 years ago
parent
commit
dc26d94014
No account linked to committer's email address
1 changed files with 9 additions and 1 deletions
  1. 9
    1
      apps/dav/lib/Connector/Sabre/Principal.php

+ 9
- 1
apps/dav/lib/Connector/Sabre/Principal.php View File

@@ -34,6 +34,8 @@

namespace OCA\DAV\Connector\Sabre;

use OCA\Circles\Exceptions\CircleDoesNotExistException;
use OCP\AppFramework\QueryException;
use OCP\IConfig;
use OCP\IGroup;
use OCP\IGroupManager;
@@ -404,7 +406,13 @@ class Principal implements BackendInterface {
return null;
}

$circle = \OCA\Circles\Api\v1\Circles::detailsCircle($circleUniqueId);
try {
$circle = \OCA\Circles\Api\v1\Circles::detailsCircle($circleUniqueId, true);
} catch(QueryException $ex) {
return null;
} catch(CircleDoesNotExistException $ex) {
return null;
}

if (!$circle) {
return null;

Loading…
Cancel
Save