From: Alex Monk Date: Tue, 27 Sep 2016 00:26:05 +0000 (+0100) Subject: MWExceptionRenderer::useOutputPage: Don't bother if we have no Title context X-Git-Tag: 1.31.0-rc.0~3083 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=f8b8d2689d57042401d7b25cac29a45ea77e58c4;p=lhc%2Fweb%2Fwiklou.git MWExceptionRenderer::useOutputPage: Don't bother if we have no Title context Change-Id: Ieb6d682a9f2fb4def4c01908ccd035fcce2e1895 --- diff --git a/includes/exception/MWExceptionRenderer.php b/includes/exception/MWExceptionRenderer.php index bd4393445b..5162a1f7d5 100644 --- a/includes/exception/MWExceptionRenderer.php +++ b/includes/exception/MWExceptionRenderer.php @@ -96,9 +96,14 @@ class MWExceptionRenderer { } } + // Don't even bother with OutputPage if there's no Title context set, + // (e.g. we're in RL code on load.php) - the Skin system (and probably + // most of MediaWiki) won't work. + return ( !empty( $GLOBALS['wgFullyInitialised'] ) && !empty( $GLOBALS['wgOut'] ) && + RequestContext::getMain()->getTitle() && !defined( 'MEDIAWIKI_INSTALL' ) ); }