]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/register.php
Registration coding cleanup
[quix0rs-gnu-social.git] / actions / register.php
index 82fb9fc5736a97fa16c9be69bbdfb236e3303bee..c97201b666762b67611233e60544a0e134ad78a5 100644 (file)
@@ -64,7 +64,7 @@ class RegisterAction extends Action
      * @param $args
      * @return string title
      */
-    function prepare($args)
+    protected function prepare(array $args=array())
     {
         parent::prepare($args);
         $this->code = $this->trimmed('code');
@@ -83,7 +83,7 @@ class RegisterAction extends Action
 
         if (!empty($this->code)) {
             $this->invite = Invitation::getKV('code', $this->code);
-            if (empty($this->invite)) {
+            if (!$this->invite instanceof Invitation) {
             // TRANS: Client error displayed when trying to register to an invite-only site without a valid invitation.
                 $this->clientError(_('Sorry, invalid invitation code.'));
             }