From: Brion Vibber
Date: Tue, 30 Dec 2008 21:34:25 +0000 (+0000)
Subject: Revert r45038 "only call pageStats function in Skin::printFooter if $wgArticle is...
X-Git-Tag: 1.31.0-rc.0~43688
X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=c6ee6a091b14a5300094d6e7a2cf85dcccb25ae7;p=lhc%2Fweb%2Fwiklou.git
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.
---
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 */