Per Simetrical's comment on r63048: use "$user instanceof User" so that it won't...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 1 Mar 2010 21:07:04 +0000 (21:07 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 1 Mar 2010 21:07:04 +0000 (21:07 +0000)
includes/specials/SpecialBlockip.php

index f8d7ac3..7e2a634 100644 (file)
@@ -410,7 +410,7 @@ class IPBlockForm {
                                # Username block
                                if( $wgSysopUserBans ) {
                                        $user = User::newFromName( $this->BlockAddress );
-                                       if( $user !== false && $user->getId() ) {
+                                       if( $user instanceof User && $user->getId() ) {
                                                # Use canonical name
                                                $userId = $user->getId();
                                                $this->BlockAddress = $user->getName();