From cb95b8de3f41f852c90a1add2189c8928234c1eb Mon Sep 17 00:00:00 2001 From: Dries Mys Date: Tue, 1 Jun 2021 01:11:21 +0200 Subject: Group may be null if backend doesn't support creating groups Signed-off-by: Dries Mys --- apps/provisioning_api/lib/Controller/GroupsController.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/provisioning_api/lib/Controller/GroupsController.php') diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php index c5ae417d465..7b6e5319c2a 100644 --- a/apps/provisioning_api/lib/Controller/GroupsController.php +++ b/apps/provisioning_api/lib/Controller/GroupsController.php @@ -247,6 +247,9 @@ class GroupsController extends AUserData { throw new OCSException('group exists', 102); } $group = $this->groupManager->createGroup($groupid); + if ($group === null) { + throw new OCSException('Not supported by backend', 103); + } if ($displayname !== '') { $group->setDisplayName($displayname); } -- cgit v1.2.3