Do not return internal edit status from EditPage

The status returned by EditPage::internalAttemptSave has
one of the AS_* constants as a value. However, if internal
WikiPage::doEdit fails, it was returning the same value as
what WikiPage::doEdit has returned. None of the callers of
EditPage::attmeptSave are prepared for that - they usually
do a switch on AS_* constants. It's used to work before
cause the internal status value was an array, and it was
implicitly cast to an integer.

Bug: T255177
Change-Id: Iec6d6a559059632b7dda53d31759bcd7d241e1b7
This commit is contained in:
Petr Pchelko 2020-06-11 11:59:03 -07:00
parent 10d722489d
commit 8fd8fb47b3

View file

@ -2356,9 +2356,9 @@ ERROR;
[ 'edit-gone-missing', 'edit-conflict', 'edit-already-exists' ] )
) {
$this->isConflict = true;
}
// Destroys data doEdit() put in $status->value but who cares
$doEditStatus->value = self::AS_END;
}
return $doEditStatus;
}