From: Alexandre Emsenhuber Date: Sat, 27 Feb 2010 15:24:49 +0000 (+0000) Subject: * (bug 22666) Submitting user block form with an invalid user name no longer throws... X-Git-Tag: 1.31.0-rc.0~37589 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=5ba3c616552f822f2bb15469f03e8aa549d15cd7;p=lhc%2Fweb%2Fwiklou.git * (bug 22666) Submitting user block form with an invalid user name no longer throws an error --- 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();