• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Is it a bug in XenForo_Model_Banning::banIp ?

Yoskaldyr

Well-known member
#1
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 :)