diff --git a/mailpoet/lib/Automation/Engine/Control/StepHandler.php b/mailpoet/lib/Automation/Engine/Control/StepHandler.php index 53c2e18b64..be58a167de 100644 --- a/mailpoet/lib/Automation/Engine/Control/StepHandler.php +++ b/mailpoet/lib/Automation/Engine/Control/StepHandler.php @@ -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 = [];