Skip to content

Commit 482aeb1

Browse files
committed
remove mt_rand min and max
1 parent 07e9d03 commit 482aeb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GeoIP.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function getIp()
7474
{
7575
if (! $this->ip) {
7676
if ($this->random) {
77-
$this->ip = long2ip(mt_rand(0, 4294967295));
77+
$this->ip = long2ip(mt_rand());
7878
} else {
7979
$this->ip = array_get($_SERVER, 'HTTP_CLIENT_IP', array_get($_SERVER, 'HTTP_X_FORWARDED_FOR', array_get($_SERVER, 'HTTP_X_FORWARDED', array_get($_SERVER, 'HTTP_FORWARDED_FOR', array_get($_SERVER, 'HTTP_FORWARDED', array_get($_SERVER, 'REMOTE_ADDR', '127.0.0.1'))))));
8080
}

0 commit comments

Comments
 (0)