]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apiaccountupdateprofile.php
Added missing isPrivateScope().
[quix0rs-gnu-social.git] / actions / apiaccountupdateprofile.php
index 6b9c358e7b79df590c9f4d5c88dd787cef5c8442..a9842ec5d8f33d80dba29e353e4597be3150623c 100644 (file)
@@ -52,7 +52,7 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
      *
      * @return boolean success flag
      */
-    protected function prepare($args)
+    protected function prepare(array $args=array())
     {
         parent::prepare($args);
 
@@ -92,7 +92,6 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
         if (empty($profile)) {
             // TRANS: Error message displayed when referring to a user without a profile.
             $this->clientError(_('User has no profile.'));
-            return;
         }
 
         $original = clone($profile);
@@ -112,7 +111,7 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
         if (!empty($this->location)) {
             $profile->location = $this->location;
 
-            $loc = Location::fromName($location);
+            $loc = Location::fromName($this->location);
 
             if (!empty($loc)) {
                 $profile->lat         = $loc->lat;
@@ -128,7 +127,6 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
             common_log_db_error($profile, 'UPDATE', __FILE__);
             // TRANS: Server error displayed if a user profile could not be saved.
             $this->serverError(_('Could not save profile.'));
-            return;
         }
 
         $twitter_user = $this->twitterUserArray($profile, true);