Skip to content

Commit

Permalink
MSH494 - Replace deprecated random_bytes_emulate()
Browse files Browse the repository at this point in the history
Fixes #494 - use the `random_bytes()` present in currently supported PHP
version instead.
  • Loading branch information
martygilbert authored and tmuras committed Jul 11, 2024
1 parent 0af3b96 commit 036dc52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Moosh/Command/Moodle39/Dev/GenerateFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private function create_files() {

// Generate random binary data (different for each file so it
// doesn't compress unrealistically).
$data = random_bytes_emulate($this->filesize);
$data = random_bytes($this->filesize);

$fs->create_file_from_string($filerecord, $data);
$this->dot($i, $count);
Expand Down

0 comments on commit 036dc52

Please sign in to comment.