X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapiaccountupdateprofile.php;h=a9842ec5d8f33d80dba29e353e4597be3150623c;hb=3346f2ebf403f7522577255d818664ef94bb4f2f;hp=fea6064f30b7cbecf508a048424797049c0d879c;hpb=29d0871e5a5b2561387bcad40ef4644ee1c2be08;p=quix0rs-gnu-social.git diff --git a/actions/apiaccountupdateprofile.php b/actions/apiaccountupdateprofile.php index fea6064f30..a9842ec5d8 100644 --- a/actions/apiaccountupdateprofile.php +++ b/actions/apiaccountupdateprofile.php @@ -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,11 +127,8 @@ 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; } - common_broadcast_profile($profile); - $twitter_user = $this->twitterUserArray($profile, true); if ($this->format == 'xml') {