MDL-41198 lib: Allow PHP to generate random seed on script start
Most srand instances are removed to allow PHP to do the work. srand was left for group randomization due to the method used. Conflicts: lib/tests/accesslib_test.php
This commit is contained in:
@@ -9720,7 +9720,6 @@ function unformat_float($locale_float, $strict = false) {
|
||||
*/
|
||||
function swapshuffle($array) {
|
||||
|
||||
srand ((double) microtime() * 10000000);
|
||||
$last = count($array) - 1;
|
||||
for ($i=0;$i<=$last;$i++) {
|
||||
$from = rand(0,$last);
|
||||
@@ -9760,7 +9759,6 @@ function swapshuffle_assoc($array) {
|
||||
* @return array
|
||||
*/
|
||||
function draw_rand_array($array, $draws) {
|
||||
srand ((double) microtime() * 10000000);
|
||||
|
||||
$return = array();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user