From 70d870dc7d586b96b8b5a64730296f2c36d93219 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Mon, 22 Apr 2019 21:43:19 -0400 Subject: [PATCH] dev/core#891 condition on id existenced when retrieving mailing hash --- 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 7e7d8ef8dd5d..f0ced3b8d881 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -1775,7 +1775,7 @@ public static function replaceGroups($mailingId, $type, $entity, $entityIds) { */ public static function getMailingHash($id) { $hash = NULL; - if (Civi::settings()->get('hash_mailing_url')) { + if (Civi::settings()->get('hash_mailing_url') && !empty($id)) { $hash = CRM_Core_DAO::getFieldValue('CRM_Mailing_BAO_Mailing', $id, 'hash', 'id'); } return $hash;