r41219 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41218‎ | r41219 | r41220 >
Date:08:33, 24 September 2008
Author:eloy
Status:old
Tags:
Comment:
additional condition, kills PHP notice when user is not defined
Modified paths:
  • /trunk/extensions/LookupUser/LookupUser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LookupUser/LookupUser.php
@@ -98,7 +98,7 @@
9999 function showInfo( $target ) {
100100 global $wgOut, $wgLang;
101101 $user = User::newFromName( $target );
102 - if ( $user->getId() == 0 ) {
 102+ if ( $user == null || $user->getId() == 0 ) {
103103 $wgOut->addWikiText( '<span class="error">' . wfMsg( 'lookupuser_nonexistent', $target ) . '</span>' );
104104 } else {
105105 $authTs = $user->getEmailAuthenticationTimestamp();

Status & tagging log