]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Profile.php
Managed_DataObject->updateWithKeys throws its own exception
[quix0rs-gnu-social.git] / classes / Profile.php
index ea99244e3189db8a06cd3c0ae0f45db6a1e4c70c..12672d21577a7a877c4f0085499e1dfbfaee3f5c 100644 (file)
@@ -838,12 +838,8 @@ class Profile extends Managed_DataObject
                 common_debug("Updating User ({$this->id}) nickname from {$dataObject->nickname} to {$this->nickname}");
                 $origuser = clone($local);
                 $local->nickname = $this->nickname;
-                $result = $local->updateWithKeys($origuser);
-                if ($result === false) {
-                    common_log_db_error($local, 'UPDATE', __FILE__);
-                    // TRANS: Server error thrown when user profile settings could not be updated.
-                    throw new ServerException(_('Could not update user nickname.'));
-                }
+                // updateWithKeys throws exception on failure.
+                $local->updateWithKeys($origuser);
 
                 // Clear the site owner, in case nickname changed
                 if ($local->hasRole(Profile_role::OWNER)) {