r12494 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12493‎ | r12494 | r12495 >
Date:03:12, 8 January 2006
Author:avar
Status:old
Tags:
Comment:
* 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
Modified paths:
  • /trunk/phase3/includes/SpecialPreferences.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPreferences.php
@@ -229,7 +229,7 @@
230230
231231 # Validate the signature and clean it up as needed
232232 if( $this->mToggles['fancysig'] ) {
233 - if( Parser::validateSig( $this->mNick ) ) {
 233+ if( Parser::validateSig( $this->mNick ) !== false ) {
234234 $this->mNick = Parser::cleanSig( $this->mNick );
235235 } else {
236236 $this->mainPrefsForm( 'error', wfMsg( 'badsig' ) );

Status & tagging log