Fix fatal on setting default profile picture
Summary: I thought I fixed this but must have not saved in my editor or something. Fixes T3552. Test Plan: Set profile image to default. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3552 Differential Revision: https://secure.phabricator.com/D6477
This commit is contained in:
@@ -78,7 +78,11 @@ final class PhabricatorPeopleProfilePictureController
|
||||
}
|
||||
|
||||
if (!$errors) {
|
||||
$user->setProfileImagePHID($xformed->getPHID());
|
||||
if ($is_default) {
|
||||
$user->setProfileImagePHID(null);
|
||||
} else {
|
||||
$user->setProfileImagePHID($xformed->getPHID());
|
||||
}
|
||||
$user->save();
|
||||
return id(new AphrontRedirectResponse())->setURI($profile_uri);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user