From 5ba3c616552f822f2bb15469f03e8aa549d15cd7 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 27 Feb 2010 15:24:49 +0000 Subject: [PATCH] * (bug 22666) Submitting user block form with an invalid user name no longer throws an error --- RELEASE-NOTES | 5 ++++- includes/specials/SpecialBlockip.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d9bb77e2e3..45171def1e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -21,7 +21,10 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN === Configuration changes in 1.17 === === Bug fixes in 1.17 === -* (bug 17560) Half-broken deletion moved image files to deletion archive without updating DB +* (bug 17560) Half-broken deletion moved image files to deletion archive without + updating DB +* (bug 22666) Submitting user block form with an invalid user name no longer + throws an error == API changes in 1.17 == diff --git a/includes/specials/SpecialBlockip.php b/includes/specials/SpecialBlockip.php index 16720dd131..1e56fa6cac 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( !is_null( $user ) && $user->getId() ) { + if( $user !== false && $user->getId() ) { # Use canonical name $userId = $user->getId(); $this->BlockAddress = $user->getName(); -- 2.20.1