Fix for r43295: check if $wgArticle is set
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 8 Nov 2008 18:30:04 +0000 (18:30 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 8 Nov 2008 18:30:04 +0000 (18:30 +0000)
includes/Skin.php

index f5c80c9..1da33ec 100644 (file)
@@ -1304,8 +1304,8 @@ END;
 
                if ( $type == 'detect' ) {
                        $diff = $wgRequest->getVal( 'diff' );
-
-                       if ( is_null( $diff ) && !$wgArticle->isCurrent() && wfMsgForContent( 'history_copyright' ) !== '-' ) {
+                       $isCur = $wgArticle && $wgArticle->isCurrent();
+                       if ( is_null( $diff ) && !$isCur && wfMsgForContent( 'history_copyright' ) !== '-' ) {
                                $type = 'history';
                        } else {
                                $type = 'normal';