From f8b8d2689d57042401d7b25cac29a45ea77e58c4 Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Tue, 27 Sep 2016 01:26:05 +0100 Subject: [PATCH] MWExceptionRenderer::useOutputPage: Don't bother if we have no Title context Change-Id: Ieb6d682a9f2fb4def4c01908ccd035fcce2e1895 --- includes/exception/MWExceptionRenderer.php | 5 +++++ 1 file changed, 5 insertions(+) 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' ) ); } -- 2.20.1