aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2019-03-03 23:07:07 +0100
committerGeorg Ehrke <developer@georgehrke.com>2019-03-03 23:07:07 +0100
commitdc26d94014b1d4e3d99c1789ee423b5d0cae12bf (patch)
tree84357a6fe8638685540aa41e4781c66db9cc8a54 /apps/dav/lib
parent58c92e604761901964a35f33a00acd5339536cbc (diff)
downloadnextcloud-server-dc26d94014b1d4e3d99c1789ee423b5d0cae12bf.tar.gz
nextcloud-server-dc26d94014b1d4e3d99c1789ee423b5d0cae12bf.zip
properly catch exceptions of detailsCircle
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/Connector/Sabre/Principal.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php
index a0051980fc1..af55b8bedb9 100644
--- a/apps/dav/lib/Connector/Sabre/Principal.php
+++ b/apps/dav/lib/Connector/Sabre/Principal.php
@@ -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;