mirror of
https://github.com/wheelybird/ldap-user-manager.git
synced 2025-01-18 15:32:54 +01:00
Update web_functions.inc.php (#117)
Fix for issue #115 Added typecast to int that fixes a fatal error telling that the second argument of rand() expects an int but a float is given on an ARMv7 architecture. Problem seems to be introduced in PHP v8.
This commit is contained in:
parent
1f4ab9e1f0
commit
7753eb4a7b
@ -49,9 +49,9 @@ validate_passkey_cookie();
|
|||||||
|
|
||||||
function generate_passkey() {
|
function generate_passkey() {
|
||||||
|
|
||||||
$rnd1 = rand(10000000,100000000000);
|
$rnd1 = rand(10000000, (int)100000000000);
|
||||||
$rnd2 = rand(10000000,100000000000);
|
$rnd2 = rand(10000000, (int)100000000000);
|
||||||
$rnd3 = rand(10000000,100000000000);
|
$rnd3 = rand(10000000, (int)100000000000);
|
||||||
return sprintf("%0x",$rnd1) . sprintf("%0x",$rnd2) . sprintf("%0x",$rnd3);
|
return sprintf("%0x",$rnd1) . sprintf("%0x",$rnd2) . sprintf("%0x",$rnd3);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user