r109286 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109285‎ | r109286 | r109287 >
Date:02:37, 18 January 2012
Author:mah
Status:ok
Tags:
Comment:
User::newFromName() can return false — warnings seen on beta.wmflabs.org
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.hooks.php
@@ -223,7 +223,7 @@
224224 // Create the Abuse Filter user.
225225 $user = User::newFromName( wfMsgForContent( 'abusefilter-blocker' ) );
226226
227 - if ( !$updater->updateRowExists( 'create abusefilter-blocker-user' ) ) {
 227+ if ( $user && !$updater->updateRowExists( 'create abusefilter-blocker-user' ) ) {
228228 if ( !$user->getId() ) {
229229 $user->addToDatabase();
230230 $user->saveSettings();

Status & tagging log