Merge "Remove space after cast"
[lhc/web/wiklou.git] / includes / exception / MWExceptionRenderer.php
index bd43934..579b6ca 100644 (file)
@@ -16,7 +16,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @author Aaron Schulz
  */
 
 use Wikimedia\Rdbms\DBConnectionError;
@@ -96,9 +95,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' )
                );
        }