* (bug 22666) Submitting user block form with an invalid user name no longer throws...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 27 Feb 2010 15:24:49 +0000 (15:24 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 27 Feb 2010 15:24:49 +0000 (15:24 +0000)
RELEASE-NOTES
includes/specials/SpecialBlockip.php

index d9bb77e..45171de 100644 (file)
@@ -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 ==
 
index 16720dd..1e56fa6 100644 (file)
@@ -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();