From e4ea23f38d27c2ec983b1d50d0bd3ba12d1b1516 Mon Sep 17 00:00:00 2001
From: Aaron Bauman <aaron@messageagency.com>
Date: Wed, 30 Nov 2022 14:04:15 -0500
Subject: [PATCH] Prevent passing null to explode

---
 .../src/SalesforceMappingFieldPluginBase.php                 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php b/modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php
index 6a3dd71b..ffa80bc7 100644
--- a/modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php
+++ b/modules/salesforce_mapping/src/SalesforceMappingFieldPluginBase.php
@@ -295,7 +295,10 @@ abstract class SalesforceMappingFieldPluginBase extends PluginBase implements Sa
         break;
 
       case 'multipicklist':
-        if (!is_array($value)) {
+        if (empty($value)) {
+          $value = [];
+        }
+        if (is_string($value)) {
           $value = explode(';', $value);
           $value = array_map('trim', $value);
         }
-- 
GitLab