File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -36,10 +36,7 @@ class MediaFileProvisioner extends \LORIS\Data\Provisioners\DBRowProvisioner
3636 * Cache of instrument->getFullname returned value.
3737 * Initializing empty keys to prevent instanciation of empty testnames.
3838 */
39- private $ _instrumentnames = [
40- null => '' ,
41- '' => ''
42- ];
39+ private $ _instrumentnames = [];
4340
4441 /**
4542 * Create a MediaFileProvisioner, which gets files for the meida
@@ -92,7 +89,8 @@ class MediaFileProvisioner extends \LORIS\Data\Provisioners\DBRowProvisioner
9289 $ testname = $ row ['testName ' ] ?? '' ;
9390 unset($ row ['testName ' ]);
9491
95- if (!isset ($ this ->_instrumentnames [$ testname ])) {
92+ // make sure not to call the factory when $testname is null or ''
93+ if (!empty ($ testname ) && !isset ($ this ->_instrumentnames [$ testname ])) {
9694 $ this ->_instrumentnames [$ testname ] = \NDB_BVL_Instrument::factory (
9795 $ this ->lorisinstance ,
9896 $ testname ,
You can’t perform that action at this time.
0 commit comments