mirror of
https://github.com/fzaninotto/Faker.git
synced 2025-03-22 00:09:59 +01:00
Fix issue in ipv4 formatter on 32 platforms
Patch from @pokmot. Closes #93
This commit is contained in:
parent
d44f1340d9
commit
a52a44508b
@ -119,7 +119,7 @@ class Internet extends \Faker\Provider\Base
|
||||
*/
|
||||
public function ipv4()
|
||||
{
|
||||
return long2ip(mt_rand(-2147483648, 2147483647));
|
||||
return long2ip(mt_rand(0, 1) == 0 ? mt_rand(-2147483648, 0) : mt_rand(1, 2147483647));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user