Fixed Is it a bug in XenForo_Model_Banning::banIp ?

Yoskaldyr

Well-known member
PHP:
    $result = $this->_getDb()->query('
       INSERT IGNORE INTO xf_ip_match
         (ip, match_type, first_byte, start_range, end_range)
       VALUES
         (?, ?, ?, ?, ?)
     ', array($niceIp, 'banned', $startRange, $startRange, $endRange));
Is it needed to change to this?
PHP:
    $result = $this->_getDb()->query('
       INSERT IGNORE INTO xf_ip_match
         (ip, match_type, first_byte, start_range, end_range)
       VALUES
         (?, ?, ?, ?, ?)
     ', array($niceIp, 'banned', $firstByte, $startRange, $endRange));

I know that it is not a problem with current database scheme, but in the similar method discourageIp $firstByte variable has been used :)
 
Top Bottom