From 7a03c5d799b824a79874c4616d7c9e73e39fddfb Mon Sep 17 00:00:00 2001 From: monishdeb Date: Wed, 29 Oct 2014 20:28:44 +0530 Subject: [PATCH] CRM-15500 fix - Scheduled reminders: if 'Also include' and 'Choose recipients' is selected, and no recipients are entered - reminder is sent to all contacts https://issues.civicrm.org/jira/browse/CRM-15500 --- CRM/Core/BAO/ActionSchedule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/BAO/ActionSchedule.php b/CRM/Core/BAO/ActionSchedule.php index 9e8e284d25..45bd673f8d 100755 --- a/CRM/Core/BAO/ActionSchedule.php +++ b/CRM/Core/BAO/ActionSchedule.php @@ -1210,7 +1210,7 @@ LEFT JOIN {$reminderJoinClause} "; CRM_Core_DAO::executeQuery($query, array(1 => array($actionSchedule->id, 'Integer'))); - if ($limitTo == 0) { + if ($limitTo == 0 && (!empty($addGroup) || !empty($addWhere))) { $additionWhere = ' WHERE '; if ($actionSchedule->start_action_date) { $additionWhere = $whereClause . ' AND '; -- 2.25.1