Skip to content

Commit

Permalink
Issue of shift operator for big number in php
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislim2888 committed Oct 2, 2016
1 parent 720c8ad commit f917780
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
Revision History for PHP Module for IP2Location
8.0.2 Sun Oct 1 10:01:00 2016
* Fixes

- Issue of shift operator for big number in php

8.0.1 Tue Aug 1 11:00:00 2016
* Fixes

Expand Down
4 changes: 2 additions & 2 deletions IP2Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Database {
*
* @var string
*/
const VERSION = '8.0.1';
const VERSION = '8.0.2';

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Error field constants ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1488,7 +1488,7 @@ private function binSearch($version, $ipNumber) {
$indexPos = 0;
switch($version){
case 4:
$ipNum1_2 = intval($ipNumber >> 16);
$ipNum1_2 = intval($ipNumber / 65536);
$indexPos = $indexBaseStart + ($ipNum1_2 << 3);

break;
Expand Down

0 comments on commit f917780

Please sign in to comment.