]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
incorrect variable access
authorEvan Prodromou <evan@controlyourself.ca>
Fri, 17 Apr 2009 20:03:33 +0000 (13:03 -0700)
committerEvan Prodromou <evan@controlyourself.ca>
Fri, 17 Apr 2009 20:57:50 +0000 (13:57 -0700)
actions/register.php

index 4ac7c349d770abcb18ae4d72200ee3be07176e2d..033cf557f8959d7ded047794425207e82a1b82ca 100644 (file)
@@ -63,13 +63,14 @@ class RegisterAction extends Action
      * @return string title
      */
 
-    function prepare()
+    function prepare($args)
     {
+        parent::prepare($args);
         $this->code = $this->trimmed('code');
 
         if (empty($this->code)) {
             common_ensure_session();
-            if (!empty($_SESSION['invitecode'])) {
+            if (array_key_exists('invitecode', $_SESSION)) {
                 $this->code = $_SESSION['invitecode'];
             }
         }
@@ -80,7 +81,7 @@ class RegisterAction extends Action
         }
 
         if (!empty($this->code)) {
-            $this->invite = Invitation::staticGet($code);
+            $this->invite = Invitation::staticGet('code', $this->code);
             if (empty($this->invite)) {
                 $this->clientError(_('Sorry, invalid invitation code.'));
                 return false;