From f90b04c6cdee92f6132c86422e9c10ea2e3c1f85 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Tue, 5 Oct 2021 22:42:38 -0400 Subject: [PATCH] don't fail on empty array --- 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 dcab6122c7..d6cc6dd592 100644 --- a/CRM/Contact/Form/Task/EmailTrait.php +++ b/CRM/Contact/Form/Task/EmailTrait.php @@ -201,7 +201,7 @@ trait CRM_Contact_Form_Task_EmailTrait { } // check if we need to setdefaults and check for valid contact emails / communication preferences - if (is_array($this->_allContactIds) && $setDefaults) { + if (!empty($this->_allContactIds) && $setDefaults) { // get the details for all selected contacts ( to, cc and bcc contacts ) $allContactDetails = civicrm_api3('Contact', 'get', [ 'id' => ['IN' => $this->_allContactIds], -- 2.25.1