$assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts);
$targetID = CRM_Utils_Array::key('Activity Targets', $activityContacts);
- if (!empty($limitTo)) {
+ if (!is_null($limitTo)) {
if ($limitTo == 0) {
// including the activity target contacts if 'in addition' is defined
$join[] = "INNER JOIN civicrm_activity_contact r ON r.activity_id = e.id AND record_type_id = {$targetID}";
$where[] = "{$contactField} IN ({$rList})";
}
}
- elseif (!empty($limitTo)) {
+ elseif (!is_null($limitTo)) {
$addGroup = $addWhere = '';
if ($actionSchedule->group_id) {
// CRM-13577 If smart group then use Cache table
";
CRM_Core_DAO::executeQuery($query, array(1 => array($actionSchedule->id, 'Integer')));
- if (!empty($limitTo) && $limitTo == 0 && (!empty($addGroup) || !empty($addWhere))) {
+ if (!is_null($limitTo) && $limitTo == 0 && (!empty($addGroup) || !empty($addWhere))) {
$additionWhere = ' WHERE ';
if ($actionSchedule->start_action_date) {
$additionWhere = $whereClause . ' AND ';