[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 12/34: Fix : generate_random_string returns a
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 12/34: Fix : generate_random_string returns always same value , due to a change in srand() |
Date: |
Sun, 5 Feb 2023 04:41:40 -0500 (EST) |
sparkyx pushed a commit to branch devel
in repository noalyss.
commit f7b3dc6534a5beecf83cd68bc471350a357491dd
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Jan 14 14:04:06 2023 +0100
Fix : generate_random_string returns always same value , due to a change in
srand()
---
include/lib/ac_common.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php
index 98ec334db..581d8b30d 100644
--- a/include/lib/ac_common.php
+++ b/include/lib/ac_common.php
@@ -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)];
- [Noalyss-commit] [noalyss] 32/34: Cosmetic #0002204: CA : balance croisée double - affichage brouillon, (continued)
- [Noalyss-commit] [noalyss] 32/34: Cosmetic #0002204: CA : balance croisée double - affichage brouillon, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 18/34: Cosmetic : improve CSS for enrich text, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 25/34: Merge branch 'devel', Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 22/34: improve code : sql : document table action_gestion, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 23/34: Documentation ManageTable.js, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 30/34: Bug #0002219: Compatibilité PHP 8.2 , 8.1 , 8.0, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 33/34: Minimum PHP 7.4, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 20/34: Fix : if there is no stock there is an exception instead of a warning, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 27/34: Bug #0002206: CA - impossible de supprimer un poste analytique, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 11/34: NEW #0002205 Mode maintenance, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 12/34: Fix : generate_random_string returns always same value , due to a change in srand(),
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 19/34: Documentation, Dany De Bontridder, 2023/02/05
- [Noalyss-commit] [noalyss] 34/34: esthetic and doc, Dany De Bontridder, 2023/02/05