From 3563fce0f315f55306f657672238d4a510bd72ea Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Tue, 13 Feb 2024 17:07:41 -0500 Subject: [PATCH] avoid deprecation errors along the lines of: [PHP Deprecation] explode(): Passing null to parameter #2 ($string) of type string is deprecated at /var/www/powerbase/sites/all/modules/civicrm/CRM/Utils/Mail/EmailProcessor.php:83 --- CRM/Utils/Mail/EmailProcessor.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Utils/Mail/EmailProcessor.php b/CRM/Utils/Mail/EmailProcessor.php index edc5a3aeb4f8..c6f676492d0f 100644 --- a/CRM/Utils/Mail/EmailProcessor.php +++ b/CRM/Utils/Mail/EmailProcessor.php @@ -80,9 +80,9 @@ public static function processActivities() { private static function _process($civiMail, $dao, $is_create_activities) { // 0 = activities; 1 = bounce; $isBounceProcessing = $dao->is_default; - $targetFields = array_filter(explode(',', $dao->activity_targets)); - $assigneeFields = array_filter(explode(",", $dao->activity_assignees)); - $sourceFields = array_filter(explode(",", $dao->activity_source)); + $targetFields = array_filter(explode(',', (string) $dao->activity_targets)); + $assigneeFields = array_filter(explode(",", (string) $dao->activity_assignees)); + $sourceFields = array_filter(explode(",", (string) $dao->activity_source)); // create an array of all of to, from, cc, bcc that are in use for this Mail Account, so we don't create contacts for emails we aren't adding to the activity. $emailFields = array_merge($targetFields, $assigneeFields, $sourceFields); $createContact = !($dao->is_contact_creation_disabled_if_no_match) && !$isBounceProcessing;