diff --git a/application/Espo/Tools/LeadCapture/LeadCapture.php b/application/Espo/Tools/LeadCapture/LeadCapture.php index 46e619c515..b38c3b6a26 100644 --- a/application/Espo/Tools/LeadCapture/LeadCapture.php +++ b/application/Espo/Tools/LeadCapture/LeadCapture.php @@ -201,6 +201,8 @@ class LeadCapture $lead = $this->getLeadWithPopulatedData($leadCapture, $data); } + $campaign = null; + $campaingService = $this->serviceFactory->create('Campaign'); if ($leadCapture->get('campaignId')) {