From 8034b1c03671a06c2a18c012323d5440692cbec7 Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Wed, 3 Aug 2016 12:31:37 +0530 Subject: [PATCH] CRM-19166: Find Contributions Send Email notice errors --- CRM/Contact/Form/Task/EmailCommon.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Task/EmailCommon.php b/CRM/Contact/Form/Task/EmailCommon.php index be19562a85..3fd971a352 100644 --- a/CRM/Contact/Form/Task/EmailCommon.php +++ b/CRM/Contact/Form/Task/EmailCommon.php @@ -236,8 +236,8 @@ class CRM_Contact_Form_Task_EmailCommon { // make a copy of all contact details $form->_allContactDetails = $form->_contactDetails; - // perform all validations - foreach ($form->_allContactIds as $key => $contactId) { + // perform all validations on unique contact Ids + foreach (array_unique($form->_allContactIds) as $key => $contactId) { $value = $form->_contactDetails[$contactId]; if ($value['do_not_email'] || empty($value['email']) || !empty($value['is_deceased']) || $value['on_hold']) { $suppressedEmails++; -- 2.25.1