From da087963640778f8fd56d9822888d843e50f8314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Laxstr=C3=B6m?= Date: Wed, 28 May 2008 14:54:19 +0000 Subject: [PATCH] * PHP Fatal error: Call to a member function getID() on a non-object --- ContributionScores.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ContributionScores.php b/ContributionScores.php index 310699d..f18c56c 100644 --- a/ContributionScores.php +++ b/ContributionScores.php @@ -82,7 +82,7 @@ function efContributionScores_Render(&$parser, $usertext, $metric='score') { $user = User::newFromName($usertext); $dbr = wfGetDB( DB_SLAVE ); - if ($user->getID() != 0) { + if ( $user instanceof User && $user->isLoggedIn() ) { if ($metric=='score') { $res = $dbr->select('revision', 'COUNT(DISTINCT rev_page)+SQRT(COUNT(rev_id)-COUNT(DISTINCT rev_page))*2 AS wiki_rank',