jenkins-bot has submitted this change and it was merged.
Change subject: Don't call $wgOut->disable() from wfHttpError if $wgOut isn't
set up yet
......................................................................
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
---
M includes/GlobalFunctions.php
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
Aaron Schulz: Looks good to me, approved
Florianschmidtwelzow: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index a1c39fb..9518182 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -2147,10 +2147,12 @@
*/
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 "<!doctype html>" .
--
To view, visit https://gerrit.wikimedia.org/r/184486
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0e9ea440dcc4c8ab7bab1f33802aeff487eb3f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits