HomePhabricator

Fix a fatal on user email settings when `account.editable` is disabled

Description

Fix a fatal on user email settings when account.editable is disabled

Summary:
If account.editable is set to false, we try to add a null button and fatal:

Argument 1 passed to PHUIHeaderView::addActionLink() must be an instance of PHUIButtonView, null given, called in /srv/phabricator/phabricator/src/applications/settings/panel/PhabricatorSettingsPanel.php on line 290

Instead, don't try to render null as a button.

Test Plan:

  • Configured account.editable false.
  • Viewed email address settings.
  • Before: fatal.
  • After: page works, no button is provided.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D18677

Details

Provenance
epriestleyAuthored on Oct 4 2017, 2:16 PM
epriestleyPushed on Oct 4 2017, 5:16 PM
Reviewer
amckinley
Differential Revision
D18677: Fix a fatal on user email settings when `account.editable` is disabled
Parents
rPbc9de7eceef0: Typo fix
Branches
Unknown
Tags
Unknown
Build Status
Buildable 18625
Build 25090: Run Core Tests