diff --git a/mailpoet/lib/Automation/Engine/Control/TriggerHandler.php b/mailpoet/lib/Automation/Engine/Control/TriggerHandler.php index 453360be60..b4bac7958c 100644 --- a/mailpoet/lib/Automation/Engine/Control/TriggerHandler.php +++ b/mailpoet/lib/Automation/Engine/Control/TriggerHandler.php @@ -59,8 +59,12 @@ class TriggerHandler { /** @param Subject[] $subjects */ public function processTrigger(Trigger $trigger, array $subjects): void { - $subjects = $this->subjectTransformerHandler->getAllSubjects($subjects); $automations = $this->automationStorage->getActiveAutomationsByTrigger($trigger); + if (!$automations) { + return; + } + + $subjects = $this->subjectTransformerHandler->getAllSubjects($subjects); foreach ($automations as $automation) { $step = $automation->getTrigger($trigger->getKey()); if (!$step) {