For other endpoints this was already fixed, as all MWExceptionRenderer logic checks headers_sent() before outputting headers. For the MW_API condition, it was calling wfHttpError(), which in turn unconditionally tried to send headers. Fix this by removing use of wfHttpError(), and instead re-use the existing logic for a minimal http error page. Do this by removing the early condition and instead let if fall into the general render methods, and then treat MW_API as a non-OutputPage scenario. Bug: T225657 Change-Id: I38bbf8007078c290a2576ef177b789fab1d2059f |
||
|---|---|---|
| .. | ||
| BadRequestError.php | ||
| BadTitleError.php | ||
| CannotCreateActorException.php | ||
| ErrorPageError.php | ||
| FatalError.php | ||
| HttpError.php | ||
| ILocalizedException.php | ||
| LocalizedException.php | ||
| MWContentSerializationException.php | ||
| MWException.php | ||
| MWExceptionHandler.php | ||
| MWExceptionRenderer.php | ||
| MWUnknownContentModelException.php | ||
| PermissionsError.php | ||
| ProcOpenError.php | ||
| ReadOnlyError.php | ||
| ShellDisabledError.php | ||
| ThrottledError.php | ||
| UserBlockedError.php | ||
| UserNotLoggedIn.php | ||