Skip to content

Commit b5419e1

Browse files
authored
Merge pull request #34 from tbembersimeao/develop
Fixing wrong logic on 2.x - 3.x migration
2 parents 003ea95 + b3fff52 commit b5419e1

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

ExternalModule.php

+8-5
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,16 @@ function redcap_module_system_change_version($version, $old_version) {
113113
continue;
114114
}
115115

116-
$conds = array_combine(
117-
$this->getProjectSetting('instrument_name', $pid),
118-
$this->getProjectSetting('control_field_value', $pid)
119-
);
116+
$forms = $this->getProjectSetting('instrument_name', $pid);
117+
$values = $this->getProjectSetting('control_field_value', $pid);
120118

121119
$bl = array();
122-
foreach ($conds as $form => $value) {
120+
foreach ($forms as $i => $form) {
121+
if (empty($form)) {
122+
continue;
123+
}
124+
125+
$value = $values[$i];
123126
if (!isset($bl[$value])) {
124127
$bl[$value] = array();
125128
}

0 commit comments

Comments
 (0)