Skip to content

Commit 1111c96

Browse files
authored
Merge pull request #6241 from ProcessMaker/bugfix/FOUR-13354
FOUR-13354: File preview in a second task, with multiple parallel, does not show the uploaded file
2 parents b635de1 + ef549c1 commit 1111c96

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎ProcessMaker/Models/ProcessRequestToken.php‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,8 +1045,12 @@ public function getLoopContext()
10451045
if (!$isMultiInstance) {
10461046
return '';
10471047
}
1048-
$loopData = $this->token_properties['data'];
1049-
$index = $loopData['loopCounter'];
1048+
$loopData = $this->token_properties['data'] ?? [];
1049+
1050+
$index = null;
1051+
if (array_key_exists('loopCounter', $loopData)) {
1052+
$index = $loopData['loopCounter'];
1053+
}
10501054
$definition = $this->getDefinition(true);
10511055
if (!$definition instanceof ActivityInterface) {
10521056
return '';
@@ -1059,7 +1063,7 @@ public function getLoopContext()
10591063
return '';
10601064
}
10611065

1062-
return $variable . '.' . $index;
1066+
return $index !== null ? $variable . '.' . $index : $variable;
10631067
}
10641068

10651069
/**

0 commit comments

Comments
 (0)