summaryrefslogtreecommitdiffstats
path: root/core/Command/Group
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2019-10-09 19:13:27 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2019-11-25 14:01:25 +0100
commit7ff15c975694f838a21e8e40cc03e21da83fdf97 (patch)
tree365ab9a9a63837693602e6a50d82542e6bd20494 /core/Command/Group
parent7b1eedb11e5f55d563831d8e58c44e615267669c (diff)
downloadnextcloud-server-7ff15c975694f838a21e8e40cc03e21da83fdf97.tar.gz
nextcloud-server-7ff15c975694f838a21e8e40cc03e21da83fdf97.zip
fix documentation, get and createGroup may return null
* also have stricter checks in place Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'core/Command/Group')
-rw-r--r--core/Command/Group/Add.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/Command/Group/Add.php b/core/Command/Group/Add.php
index f2ee6195a44..284cf7a3e9d 100644
--- a/core/Command/Group/Add.php
+++ b/core/Command/Group/Add.php
@@ -68,6 +68,10 @@ class Add extends Base {
return 1;
} else {
$group = $this->groupManager->createGroup($gid);
+ if($group === false) {
+ $output->writeln('<error>Could not create group</error>');
+ return 2;
+ }
$output->writeln('Created group "' . $group->getGID() . '"');
$displayName = trim((string) $input->getOption('display-name'));