From 877cf6219f8faf14edcff9759955c68187c34e19 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Mon, 1 Mar 2010 21:07:04 +0000 Subject: [PATCH] Per Simetrical's comment on r63048: use "$user instanceof User" so that it won't break whatever User::newFromName() returns on failure --- includes/specials/SpecialBlockip.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/specials/SpecialBlockip.php b/includes/specials/SpecialBlockip.php index f8d7ac357f..7e2a634015 100644 --- a/includes/specials/SpecialBlockip.php +++ b/includes/specials/SpecialBlockip.php @@ -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(); -- 2.20.1