Skip to content

Commit

Permalink
Merge branch 'wip-MDL-65220-master' of https://github.com/jason-platt…
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllaó committed Apr 15, 2019
2 parents ce93b0f + f7af1e0 commit c4beecb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/testing/classes/util.php
Original file line number Diff line number Diff line change
Expand Up @@ -926,12 +926,11 @@ public static function set_table_modified_by_sql($sql) {

if (defined('BEHAT_SITE_RUNNING')) {
$tablesupdatedfile = self::get_tables_updated_by_scenario_list_path();
if ($tablesupdated = @json_decode(file_get_contents($tablesupdatedfile), true)) {
$tablesupdated[$table] = true;
} else {
$tablesupdated = @json_decode(file_get_contents($tablesupdatedfile), true);
if (!isset($tablesupdated[$table])) {
$tablesupdated[$table] = true;
@file_put_contents($tablesupdatedfile, json_encode($tablesupdated, JSON_PRETTY_PRINT));
}
@file_put_contents($tablesupdatedfile, json_encode($tablesupdated, JSON_PRETTY_PRINT));
}
}
}
Expand Down

0 comments on commit c4beecb

Please sign in to comment.