Update ticket.lib.php
This commit is contained in:
parent
4a96baed9b
commit
47aa1b4001
1 changed files with 1 additions and 3 deletions
|
|
@ -230,11 +230,9 @@ function generate_random_id($car = 16)
|
|||
|
||||
for ($i = 0; $i < $car; $i++) {
|
||||
try {
|
||||
// Cela ne dépend PAS de microtime() et ne nécessite pas de srand/seed.
|
||||
$key = random_int(0, $max);
|
||||
} catch (\Exception $e) {
|
||||
// Fallback de secours extrême si la source d'entropie système est illisible
|
||||
// On laisse PHP gérer le seeding automatiquement ici (plus de mt_srand manuel)
|
||||
// Fallback. We let PHP makes the seed automatically (no manual mt_srand)
|
||||
$key = mt_rand(0, $max);
|
||||
}
|
||||
$string .= $chaine[$key];
|
||||
|
|
|
|||
Loading…
Reference in a new issue