MWExceptionRenderer::useOutputPage: Don't bother if we have no Title context
authorAlex Monk <krenair@gmail.com>
Tue, 27 Sep 2016 00:26:05 +0000 (01:26 +0100)
committerChad <chadh@wikimedia.org>
Wed, 31 May 2017 22:52:46 +0000 (22:52 +0000)
Change-Id: Ieb6d682a9f2fb4def4c01908ccd035fcce2e1895

includes/exception/MWExceptionRenderer.php

index bd43934..5162a1f 100644 (file)
@@ -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' )
                );
        }