From: Sam Reed Date: Thu, 15 Dec 2011 18:57:53 +0000 (+0000) Subject: * (bug 33101) Viewing a User or User talk of username resembling IP ending with... X-Git-Tag: 1.31.0-rc.0~25951 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=85ee2d2db2ee9fa72c95cd39b106e043d0a7c6fc;p=lhc%2Fweb%2Fwiklou.git * (bug 33101) Viewing a User or User talk of username resembling IP ending with .xxx causes Internal error Patch by Brad Jorsch Also simplify double return null in method --- diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 0f663dcb75..e34014b705 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -183,6 +183,8 @@ production. * (bug 32960) Remove EmailAuthenticationTimestamp from database when a email address is removed. * (bug 32414) Empty page get a empty bytes attribute in Export/Dump. +* (bug 33101) Viewing a User or User talk of username resembling IP ending + with .xxx causes Internal error === API changes in 1.19 === * (bug 19838) siprop=interwikimap can now use the interwiki cache. diff --git a/includes/Block.php b/includes/Block.php index 9cdb9d281e..ded9cf9ef2 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -430,7 +430,7 @@ class Block { $row = $this->getDatabaseArray(); $row['ipb_id'] = $dbw->nextSequenceValue("ipblocks_ipb_id_seq"); - + $dbw->insert( 'ipblocks', $row, @@ -969,7 +969,7 @@ class Block { */ public static function formatExpiry( $encoded_expiry ) { wfDeprecated( __METHOD__, '1.18' ); - + global $wgContLang; static $msg = null; @@ -1039,7 +1039,7 @@ class Block { # passed by some callers (bug 29116) return null; - } elseif( in_array( $type, array( Block::TYPE_USER, Block::TYPE_IP, Block::TYPE_RANGE, null ) ) ) { + } elseif( in_array( $type, array( Block::TYPE_USER, Block::TYPE_IP, Block::TYPE_RANGE ) ) ) { $block = new Block(); $block->fromMaster( $fromMaster ); @@ -1049,12 +1049,9 @@ class Block { if( $block->newLoad( $vagueTarget ) ){ return $block; - } else { - return null; } - } else { - return null; } + return null; } /**