From 64d7b73740e17c45a9f881b67390be225fe7a072 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 4 Apr 2019 15:33:57 +1100 Subject: [PATCH] dev/mail#41 Do not generate tracking urls if no mailing id has been passed in --- CRM/Mailing/BAO/Mailing.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 7177149ea4..7e7d8ef8dd 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -1383,7 +1383,7 @@ ORDER BY civicrm_email.is_bulkmail DESC } } elseif ($type == 'url') { - if ($this->url_tracking) { + if ($this->url_tracking && !empty($this->id)) { // ensure that Google CSS and any .css files are not tracked. if (!(strpos($token, 'css?family') || strpos($token, '.css'))) { $data = CRM_Mailing_BAO_TrackableURL::getTrackerURL($token, $this->id, $event_queue_id); -- 2.25.1