Index: trunk/extensions/Renameuser/Renameuser.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | global $wgOut; |
74 | 74 | $title = $article->getTitle(); |
75 | 75 | $oldUserName = User::newFromName( $title->getBaseText() ); |
76 | | - if ( ($title->getNamespace() == NS_USER || $title->getNamespace() == NS_USER_TALK ) && $oldUserName->getId()==0) { |
| 76 | + if ( ($title->getNamespace() == NS_USER || $title->getNamespace() == NS_USER_TALK ) && ($oldUserName && $oldUserName->getId()==0 )) { |
77 | 77 | // Get the title for the base userpage |
78 | 78 | $page = Title::makeTitle( NS_USER, str_replace( ' ', '_', $title->getBaseText() ) )->getPrefixedDBkey(); |
79 | 79 | LogEventsList::showLogExtract( $wgOut, 'renameuser', $page, '', array( 'lim' => 10, 'showIfEmpty' => false, |