diff --git a/backup/cc/entities.class.php b/backup/cc/entities.class.php index c9e55264508..4f441ba4a3a 100644 --- a/backup/cc/entities.class.php +++ b/backup/cc/entities.class.php @@ -309,7 +309,6 @@ class entities { $source = str_split($source, 1); for ($i = 1; $i <= $length; $i++) { - mt_srand((double) microtime() * 1000000); $num = mt_rand(1, count($source)); $response .= $source[$num - 1]; } diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 6f53dcf1f44..4179c7d8885 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -7650,7 +7650,6 @@ function random_string ($length=15) { $pool .= 'abcdefghijklmnopqrstuvwxyz'; $pool .= '0123456789'; $poollen = strlen($pool); - mt_srand ((double) microtime() * 1000000); $string = ''; for ($i = 0; $i < $length; $i++) { $string .= substr($pool, (mt_rand()%($poollen)), 1); @@ -7671,7 +7670,6 @@ function complex_random_string($length=null) { $pool = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; $pool .= '`~!@#%^&*()_+-=[];,./<>?:{} '; $poollen = strlen($pool); - mt_srand ((double) microtime() * 1000000); if ($length===null) { $length = floor(rand(24, 32)); }