From: Alexandre Emsenhuber Date: Wed, 16 Apr 2008 16:17:44 +0000 (+0000) Subject: Allow $wgArticle to be null on special pages X-Git-Tag: 1.31.0-rc.0~48270 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=6784414bbd3733814c8891303695f7d48dde1a1c;p=lhc%2Fweb%2Fwiklou.git Allow $wgArticle to be null on special pages --- diff --git a/includes/Exception.php b/includes/Exception.php index 7b7254ffd0..8a76b5f52e 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -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'] ); } /**