diff --git a/mailpoet/lib/Automation/Engine/Control/StepHandler.php b/mailpoet/lib/Automation/Engine/Control/StepHandler.php index 945061e858..6293d3f250 100644 --- a/mailpoet/lib/Automation/Engine/Control/StepHandler.php +++ b/mailpoet/lib/Automation/Engine/Control/StepHandler.php @@ -127,7 +127,7 @@ class StepHandler { } // no need to schedule a new step if the next step is null, complete the run - if (empty($nextStepArgs[0]['step_id'])) { + if (!$nextStep) { $this->workflowRunStorage->updateStatus($workflowRunId, WorkflowRun::STATUS_COMPLETE); return; }