Allow $wgArticle to be null on special pages
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 16 Apr 2008 16:17:44 +0000 (16:17 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 16 Apr 2008 16:17:44 +0000 (16:17 +0000)
includes/Exception.php

index 7b7254f..8a76b5f 100644 (file)
@@ -12,7 +12,8 @@ class MWException extends Exception {
         */
        function useOutputPage() {
                return !empty( $GLOBALS['wgFullyInitialised'] ) &&
-                       !empty( $GLOBALS['wgArticle'] ) && !empty( $GLOBALS['wgTitle'] );
+                       ( !empty( $GLOBALS['wgArticle'] ) || ( !empty( $GLOBALS['wgOut'] ) && !$GLOBALS['wgOut']->isArticle() ) ) &&
+                       !empty( $GLOBALS['wgTitle'] );
        }
 
        /**