1. 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 ?

Discussion in 'Resolved Bug Reports' started by Yoskaldyr, Oct 6, 2015.

  1. Yoskaldyr

    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 :)
     
  2. Mike

    Mike XenForo Developer Staff Member

    It appears that it gets implicitly converted to the correct value, but $firstByte is correct.
     
    Yoskaldyr likes this.

Share This Page