fix for random numbers
This commit is contained in:
parent
e972e9d071
commit
1ca279d353
|
@ -1111,9 +1111,9 @@ class moduleCache {
|
||||||
*/
|
*/
|
||||||
function getRandomNumber() {
|
function getRandomNumber() {
|
||||||
if (function_exists('openssl_random_pseudo_bytes')) {
|
if (function_exists('openssl_random_pseudo_bytes')) {
|
||||||
return hexdec(bin2hex(openssl_random_pseudo_bytes(5)));
|
return abs(hexdec(bin2hex(openssl_random_pseudo_bytes(5))));
|
||||||
}
|
}
|
||||||
return mt_rand();
|
return abs(mt_rand());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue