mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 22:15:24 +02:00
MDL-43266 testing: avoid assoc arrays for json
Last commit switched from raw arrays to associative arrays. That leads to json_encode() to generate an object instead of an array, ultimately leading to problems with the rest of code expecting an array. By using array_values() we are moving back to the non-associative array. Also, fix some file permissions.
This commit is contained in:
parent
1700bec3c6
commit
630bb85d9e
0
lib/phpunit/classes/util.php
Executable file → Normal file
0
lib/phpunit/classes/util.php
Executable file → Normal file
2
lib/testing/classes/util.php
Executable file → Normal file
2
lib/testing/classes/util.php
Executable file → Normal file
@ -879,7 +879,7 @@ abstract class testing_util {
|
||||
|
||||
// Save the file list in a JSON file.
|
||||
$fp = fopen($jsonfilepath, 'w');
|
||||
fwrite($fp, json_encode($listfiles));
|
||||
fwrite($fp, json_encode(array_values($listfiles)));
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user