From c6ee6a091b14a5300094d6e7a2cf85dcccb25ae7 Mon Sep 17 00:00:00 2001
From: Brion Vibber
Date: Tue, 30 Dec 2008 21:34:25 +0000
Subject: [PATCH] Revert r45038 "only call pageStats function in
Skin::printFooter if $wgArticle is an object. this might not always be the
case (tested with a custom skin extending the Skin class) and if so, a fatal
error is shown on the page (tested with Special: pages) and footer won't be
rendered" Skin::pageStats() has checks meant to catch this already. If
they're faulty, fix them there.
---
includes/Skin.php | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/includes/Skin.php b/includes/Skin.php
index 0c221febc2..4a45c5ef8f 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -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 ) ? "" . $this->pageStats() . "
\n" : '' );
return "" . $this->printSource() .
- "
\n\n" . $stats;
+ "
\n\n" . $this->pageStats() . "
\n";
}
/** overloaded by derived classes */
--
2.20.1