From 93582fe2bb40f2268a39a8aaa263c8e0c3c366be Mon Sep 17 00:00:00 2001 From: Jamie McClelland <jm@mayfirst.org> Date: Wed, 11 Dec 2013 16:46:43 -0500 Subject: [PATCH] CRM-13960 - import - ensure empty fields don't throw validation errors ---------------------------------------- * CRM-13960: importing an empty custom data value for bolean type results in validation error http://issues.civicrm.org/jira/browse/CRM-13960 --- CRM/Contact/Import/Parser/Contact.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CRM/Contact/Import/Parser/Contact.php b/CRM/Contact/Import/Parser/Contact.php index 3784549b64..8174ec7002 100644 --- a/CRM/Contact/Import/Parser/Contact.php +++ b/CRM/Contact/Import/Parser/Contact.php @@ -1891,8 +1891,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser { //now format custom data. foreach ($params as $key => $field) { - if (!isset($field)){ - // if ($field == NULL || $field === '') { + if (!isset($field) || empty($field)){ unset($params[$key]); continue; } -- GitLab