Fix : generate_random_string returns always same value , due to a change in srand()

This commit is contained in:
sparkyx 2023-01-14 14:04:06 +01:00
parent 3ea69c3113
commit 4679238d37

View file

@ -1473,7 +1473,7 @@ function generate_random_string($car)
{
$string="";
$chaine="abcdefghijklmnpqrstuvwxyABCDEFGHIJKLMNPQRSTUVWXY0123456789*/+-=";
srand((int) microtime()*1020030);
srand((float) microtime(true)*1020030);
for ($i=0; $i<$car; $i++)
{
$string .= $chaine[rand()%strlen($chaine)];