From dd103b81d77dcee68dc08d846b6d24f15918958c Mon Sep 17 00:00:00 2001 From: David Remer Date: Wed, 18 Oct 2023 09:11:39 +0300 Subject: [PATCH] Catch exceptions when trying to match filters in trigger handler [PREMIUM-248] --- mailpoet/lib/Automation/Engine/Control/TriggerHandler.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mailpoet/lib/Automation/Engine/Control/TriggerHandler.php b/mailpoet/lib/Automation/Engine/Control/TriggerHandler.php index fc5c160c44..be9daabd1a 100644 --- a/mailpoet/lib/Automation/Engine/Control/TriggerHandler.php +++ b/mailpoet/lib/Automation/Engine/Control/TriggerHandler.php @@ -82,7 +82,13 @@ class TriggerHandler { $automationRun = new AutomationRun($automation->getId(), $automation->getVersionId(), $trigger->getKey(), $subjects); $stepRunArgs = new StepRunArgs($automation, $automationRun, $step, $subjectEntries, 1); - if (!$this->filterHandler->matchesFilters($stepRunArgs)) { + $match = false; + try { + $match = $this->filterHandler->matchesFilters($stepRunArgs); + } catch (Exceptions\Exception $e) { + ; + } + if (!$match) { continue; }