From: Brad Jorsch Date: Mon, 12 Jan 2015 21:46:18 +0000 (-0500) Subject: Don't call $wgOut->disable() from wfHttpError if $wgOut isn't set up yet X-Git-Tag: 1.31.0-rc.0~12708 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=7d9161241149002e9216ca484b89c153e4e8c03f;p=lhc%2Fweb%2Fwiklou.git Don't call $wgOut->disable() from wfHttpError if $wgOut isn't set up yet For example, if the database cannot be connected to, the language is something other than 'en', and the l10n cache is LCStoreDB, then the call to Language::factory() in Setup.php line 604 will do it when it's trying to get the fallback list. Bug: T86398 Change-Id: Ia0e9ea440dcc4c8ab7bab1f33802aeff487eb3f0 --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index a1c39fb217..9518182d82 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2147,10 +2147,12 @@ function wfVarDump( $var ) { */ function wfHttpError( $code, $label, $desc ) { global $wgOut; - $wgOut->disable(); header( "HTTP/1.0 $code $label" ); header( "Status: $code $label" ); - $wgOut->sendCacheControl(); + if ( $wgOut ) { + $wgOut->disable(); + $wgOut->sendCacheControl(); + } header( 'Content-type: text/html; charset=utf-8' ); print "" .