]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
added missing return statement after showForm call
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 6 Aug 2012 20:35:38 +0000 (22:35 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 12 Aug 2013 10:44:19 +0000 (12:44 +0200)
Issue #3125 at http://status.net/open-source/issues/3125 (and its duplicate 3127) describe buggy behaviour when trying to create a new group - i.e. the group is still created but with nickname NULL.

The reason the group is created is that when failing Nickname::normalize, the function trySave() in actions/newgroup.php doesn't call 'return' - meaning it just keeps going despite the error thrown. It a

So the simple solution to this bug was adding a return call at line 128, inside the catch just after the showForm(...) call.

actions/newgroup.php

index cf3125fd87cf77b9ed491cb7a28e30e7209b570e..8e02adaba101d789ca44598df29d209b1df8b125 100644 (file)
@@ -125,6 +125,7 @@ class NewgroupAction extends Action
                 $nickname = Nickname::normalize($this->trimmed('newnickname'));
             } catch (NicknameException $e) {
                 $this->showForm($e->getMessage());
+                return;
             }
             $fullname    = $this->trimmed('fullname');
             $homepage    = $this->trimmed('homepage');