Followup r81812: per CR, this could be 0
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 9 Feb 2011 14:59:44 +0000 (14:59 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 9 Feb 2011 14:59:44 +0000 (14:59 +0000)
includes/User.php

index 0f9d973..46d6f42 100644 (file)
@@ -586,7 +586,7 @@ class User {
                }
 
                // Preg yells if you try to give it an empty string
-               if( $wgInvalidUsernameCharacters ) {
+               if( $wgInvalidUsernameCharacters !== '' ) {
                        if( preg_match( '/[' . preg_quote( $wgInvalidUsernameCharacters, '/' ) . ']/', $name ) ) {
                                wfDebugLog( 'username', __METHOD__ .
                                        ": '$name' invalid due to wgInvalidUsernameCharacters" );