Fix possible undefined index access

[MAILPOET-4629]
This commit is contained in:
Jan Jakes
2022-09-22 15:26:31 +02:00
committed by David Remer
parent 76d2d40198
commit c9c98b403c

View File

@@ -181,7 +181,7 @@ class StepHandler {
private function getSubjectEntries(WorkflowRun $workflowRun, array $requiredSubjectKeys): array {
$subjectDataMap = [];
foreach ($workflowRun->getSubjects() as $data) {
$subjectDataMap[$data->getKey()] = array_merge($subjectDataMap[$data->getKey()], [$data]);
$subjectDataMap[$data->getKey()] = array_merge($subjectDataMap[$data->getKey()] ?? [], [$data]);
}
$subjectEntries = [];