* Fixed bugs introduced in revision 1.155 by rob ;)
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sun, 8 Jan 2006 03:12:54 +0000 (03:12 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sun, 8 Jan 2006 03:12:54 +0000 (03:12 +0000)
  - Using $x === false, if ($x) is a logic error in this case because PHP
    thinks (among other things) that (int)0 and (string)0 are false, so a
custom signiture that was "0" would fail

includes/SpecialPreferences.php

index 3f80317..7a2e76d 100644 (file)
@@ -229,7 +229,7 @@ class PreferencesForm {
 
                # Validate the signature and clean it up as needed
                if( $this->mToggles['fancysig'] ) {
-                       if( Parser::validateSig( $this->mNick ) ) {
+                       if( Parser::validateSig( $this->mNick ) !== false ) {
                                $this->mNick = Parser::cleanSig( $this->mNick );
                        } else {
                                $this->mainPrefsForm( 'error', wfMsg( 'badsig' ) );