Browse Source

Do not count each iteration

tags/2.0.26
Alexander Makarov 5 years ago
parent
commit
851e846688
No known key found for this signature in database
GPG Key ID: 3617B79C6A325E4A
  1. 2
      framework/helpers/BaseIpHelper.php

2
framework/helpers/BaseIpHelper.php

@ -119,7 +119,7 @@ class BaseIpHelper
}
$result = '';
for ($i = 0; $i < strlen($ipBinary); $i += 4) {
for ($i = 0, $iMax = strlen($ipBinary); $i < $iMax; $i += 4) {
$result .= str_pad(decbin(unpack('N', substr($ipBinary, $i, 4))[1]), 32, '0', STR_PAD_LEFT);
}
return $result;

Loading…
Cancel
Save