Fix : generate_random_string returns always same value , due to a change in srand()
This commit is contained in:
parent
3ea69c3113
commit
4679238d37
1 changed files with 1 additions and 1 deletions
|
|
@ -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)];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue