r90874 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90873‎ | r90874 | r90875 >
Date:13:48, 27 June 2011
Author:happy-melon
Status:ok
Tags:
Comment:
Follow-up r88738: this check is no longer needed since r88750.
Modified paths:
  • /trunk/phase3/includes/Block.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Block.php
@@ -988,11 +988,6 @@
989989 * not be the same as the target you gave if you used $vagueTarget!
990990 */
991991 public static function newFromTarget( $specificTarget, $vagueTarget = null, $fromMaster = false ) {
992 - # (bug 29116) passing $vagueTarget = '' is not unreasonable here, but int(0)
993 - # is a valid username, so we can't just use weak comparisons.
994 - if( $vagueTarget === '' ){
995 - $vagueTarget = null;
996 - }
997992
998993 list( $target, $type ) = self::parseTarget( $specificTarget );
999994 if( $type == Block::TYPE_ID || $type == Block::TYPE_AUTO ){
@@ -1000,7 +995,8 @@
1001996
1002997 } elseif( $target === null && $vagueTarget == '' ){
1003998 # We're not going to find anything useful here
1004 - # Be aware that the == '' check is explicit, since empty values will be passed by some callers.
 999+ # Be aware that the == '' check is explicit, since empty values will be
 1000+ # passed by some callers (bug 29116)
10051001 return null;
10061002
10071003 } elseif( in_array( $type, array( Block::TYPE_USER, Block::TYPE_IP, Block::TYPE_RANGE, null ) ) ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88738(bug 29116) follow-up r84475: normalise the empty string to null in Block::ne...happy-melon19:03, 24 May 2011
r88750* (bug 29116) Fix regression breaking CheckUser extension...brion21:04, 24 May 2011

Status & tagging log