Revert r45038 "only call pageStats function in Skin::printFooter if $wgArticle is...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 30 Dec 2008 21:34:25 +0000 (21:34 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 30 Dec 2008 21:34:25 +0000 (21:34 +0000)
Skin::pageStats() has checks meant to catch this already. If they're faulty, fix them there.

includes/Skin.php

index 0c221fe..4a45c5e 100644 (file)
@@ -917,13 +917,8 @@ END;
        }
 
        function printFooter() {
-               global $wgArticle;
-               // Under certain conditions, $wgArticle might not be an object which would cause a fatal error like this:
-               // Fatal error: Call to a member function getID() on a non-object in ../includes/Skin.php on line 1270
-               // To prevent this, we'll check first if $wgArticle is an object and if that's the case, then we'll load the page stats.
-               $stats = ( is_object( $wgArticle ) ? "<p>" . $this->pageStats() . "</p>\n" : '' );
                return "<p>" .  $this->printSource() .
-                       "</p>\n\n" . $stats;
+                       "</p>\n\n<p>" . $this->pageStats() . "</p>\n";
        }
 
        /** overloaded by derived classes */