From 4e2e709e0cb1c307201f3b439a92bda75b387113 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 8 Jan 2006 03:12:54 +0000 Subject: [PATCH] * Fixed bugs introduced in revision 1.155 by rob ;) - 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/SpecialPreferences.php b/includes/SpecialPreferences.php index 3f803175a4..7a2e76d0b1 100644 --- a/includes/SpecialPreferences.php +++ b/includes/SpecialPreferences.php @@ -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' ) ); -- 2.20.1