r42246 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42245‎ | r42246 | r42247 >
Date:01:34, 20 October 2008
Author:werdna
Status:old
Tags:
Comment:
(bug 16040) With CentralAuth not set up all that well, GlobalBlocking gives a fatal error on GlobalBlockList.
Modified paths:
  • /trunk/extensions/GlobalBlocking/GlobalBlocking.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GlobalBlocking/GlobalBlocking.php
@@ -210,8 +210,10 @@
211211 if (class_exists('WikiMap')) {
212212 // We can give more info than just the wiki id!
213213 $wiki = WikiMap::getWiki( $wiki_id );
214 -
215 - return $wiki->getDisplayName();
 214+
 215+ if ($wiki) {
 216+ return $wiki->getDisplayName();
 217+ }
216218 }
217219
218220 return $wiki_id;
@@ -221,7 +223,9 @@
222224 if (class_exists( 'WikiMap')) {
223225 $wiki = WikiMap::getWiki( $wiki_id );
224226
225 - return "[".$wiki->getUrl( "User:$user" )." $user]";
 227+ if ($wiki) {
 228+ return "[".$wiki->getUrl( "User:$user" )." $user]";
 229+ }
226230 }
227231 return $user;
228232 }

Status & tagging log