]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Group.php
Merge pull request #7435 from annando/select-to-array
[friendica.git] / src / Module / Group.php
index eb1389d799e33d5c27d2d15f1264306ba0dd5cba..d8d5fb1c592086e9e2574fb246fbdf8eb08a5992 100644 (file)
@@ -137,7 +137,7 @@ class Group extends BaseModule
                $change = false;
 
                if (!local_user()) {
-                       System::httpExit(403);
+                       throw new \Friendica\Network\HTTPException\ForbiddenException();
                }
 
                $a = self::getApp();
@@ -176,7 +176,9 @@ class Group extends BaseModule
 
                $nogroup = false;
 
-               if (($a->argc == 2) && ($a->argv[1] === 'none')) {
+               // @TODO: Replace with parameter from router
+               if (($a->argc == 2) && ($a->argv[1] === 'none') ||
+                       ($a->argc == 1) && ($a->argv[0] === 'nogroup')) {
                        $id = -1;
                        $nogroup = true;
                        $group = [
@@ -276,7 +278,7 @@ class Group extends BaseModule
                }
 
                if (!isset($group)) {
-                       System::httpExit(400);
+                       throw new \Friendica\Network\HTTPException\BadRequestException();
                }
 
                $groupeditor = [