Skip to content

Commit

Permalink
[Tools] Fix to prevent fatal in fix_candidate_age.php (#7546)
Browse files Browse the repository at this point in the history
Fixes #7545
  • Loading branch information
laemtl authored Aug 26, 2021
1 parent 6f2888b commit 30687ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/data_integrity/fix_candidate_age.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
require_once __DIR__ . '/../generic_includes.php';

$instruments = \NDB_BVL_Instrument::getInstrumentsList();
$instruments = \NDB_BVL_Instrument::getInstrumentsList($lorisInstance);

if (empty($argv[1])
|| (!empty($argv[1])
Expand Down
12 changes: 10 additions & 2 deletions tools/generic_includes.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,13 @@
$client = new NDB_Client();
$client->makeCommandLine();
$client->initialize($configFile);
$DB = Database::singleton();
$config = NDB_Config::singleton();
$DB = Database::singleton();
$config = NDB_Config::singleton();
$lorisInstance = new \LORIS\LorisInstance(
$DB,
$config,
[
__DIR__ . "/../project/modules",
__DIR__ . "/../modules/",
],
);

0 comments on commit 30687ad

Please sign in to comment.