preferences: Preserve Status from saveFormData() in submitForm()
The old Preference::tryUISubmit() and the new submitForm() would blissfully return Status::newGood(), even when it isn't good. Bug: T191933 Change-Id: I4e35c5a71800f88b2063dd0361d83a56f54d58c3
This commit is contained in:
parent
df240f9537
commit
7b2182d9e5
1 changed files with 2 additions and 3 deletions
|
|
@ -1724,9 +1724,8 @@ class DefaultPreferencesFactory implements PreferencesFactory {
|
|||
protected function submitForm( array $formData, PreferencesForm $form ) {
|
||||
$res = $this->saveFormData( $formData, $form );
|
||||
|
||||
if ( $res ) {
|
||||
if ( $res === true ) {
|
||||
$context = $form->getContext();
|
||||
|
||||
$urlOptions = [];
|
||||
|
||||
if ( $res === 'eauth' ) {
|
||||
|
|
@ -1750,7 +1749,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
|
|||
$context->getOutput()->redirect( $url );
|
||||
}
|
||||
|
||||
return Status::newGood();
|
||||
return ( $res === true ? Status::newGood() : $res );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue