(bug 44111) ErrorPageError log messages should be in English
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 11 Mar 2013 18:26:56 +0000 (14:26 -0400)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 28 Mar 2013 02:39:05 +0000 (02:39 +0000)
commitfb04d38e233f2fd34ec64dafdac614d89c622941
treee0c092a9f16d6016ae8101f825c5a87bd666bf38
parent30ed1302b1ae1a5ba583edd02158a1840dc8dc12
(bug 44111) ErrorPageError log messages should be in English

We want log messages to be in English. ErrorPageError, however, will log
the messages using the language of the current user. This isn't often
noticed, because the normal page view code path doesn't log
ErrorPageError and the API doesn't usually have ErrorPageError thrown in
the first place.

The fix is simple enough: in the constructor, create a new Message
object and call ->inLanguage( 'en' ) on it. And, for good measure,
->useDatabase( false ) so customizations on the local wiki won't show up
in the log files either.

Since ErrorPageError already overrides report(), that will take care of
still showing the expected language to the end user.

Bug: 44111
Change-Id: I9a6ab43d63e76fa9708b62e32ddc3262aff282f7
includes/Exception.php