From: Happy-melon Date: Mon, 27 Jun 2011 13:48:01 +0000 (+0000) Subject: Follow-up r88738: this check is no longer needed since r88750. X-Git-Tag: 1.31.0-rc.0~29250 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=b99ab08b2a268c0178679e76b403b9fdc4afa9a1;p=lhc%2Fweb%2Fwiklou.git Follow-up r88738: this check is no longer needed since r88750. --- diff --git a/includes/Block.php b/includes/Block.php index 0b52d85ea8..0600faaa7b 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -988,11 +988,6 @@ class Block { * not be the same as the target you gave if you used $vagueTarget! */ public static function newFromTarget( $specificTarget, $vagueTarget = null, $fromMaster = false ) { - # (bug 29116) passing $vagueTarget = '' is not unreasonable here, but int(0) - # is a valid username, so we can't just use weak comparisons. - if( $vagueTarget === '' ){ - $vagueTarget = null; - } list( $target, $type ) = self::parseTarget( $specificTarget ); if( $type == Block::TYPE_ID || $type == Block::TYPE_AUTO ){ @@ -1000,7 +995,8 @@ class Block { } elseif( $target === null && $vagueTarget == '' ){ # We're not going to find anything useful here - # Be aware that the == '' check is explicit, since empty values will be passed by some callers. + # Be aware that the == '' check is explicit, since empty values will be + # passed by some callers (bug 29116) return null; } elseif( in_array( $type, array( Block::TYPE_USER, Block::TYPE_IP, Block::TYPE_RANGE, null ) ) ) {