From 76dcf463bdc227f85dc572b8cf0710bfbb218f3c Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Tue, 23 Mar 2021 13:37:50 -0400 Subject: [PATCH] crash when assignee left blank --- CRM/Contact/Form/Task/EmailTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contact/Form/Task/EmailTrait.php b/CRM/Contact/Form/Task/EmailTrait.php index 67c06172d8e1..8ab410c15136 100644 --- a/CRM/Contact/Form/Task/EmailTrait.php +++ b/CRM/Contact/Form/Task/EmailTrait.php @@ -630,7 +630,7 @@ protected function createFollowUpActivities($formValues, $activityId): string { $params['followup_activity_subject'] = $formValues['followup_activity_subject']; $params['followup_date'] = $formValues['followup_date']; $params['target_contact_id'] = $this->_contactIds; - $params['followup_assignee_contact_id'] = explode(',', $formValues['followup_assignee_contact_id']); + $params['followup_assignee_contact_id'] = array_filter(explode(',', $formValues['followup_assignee_contact_id'])); $followupActivity = CRM_Activity_BAO_Activity::createFollowupActivity($activityId, $params); $followupStatus = ts('A followup activity has been scheduled.');