dev/mail#41 Do not generate tracking urls if no mailing id has been passed in
authorSeamus Lee <seamuslee001@gmail.com>
Thu, 4 Apr 2019 04:33:57 +0000 (15:33 +1100)
committerSeamus Lee <seamuslee001@gmail.com>
Wed, 17 Apr 2019 20:49:34 +0000 (06:49 +1000)
CRM/Mailing/BAO/Mailing.php

index 7177149ea478aafe5808f15722bd8646ae3e7bb9..7e7d8ef8dd5d6b447172aafe396bda237071d39d 100644 (file)
@@ -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);