From: Jamie McClelland Date: Wed, 11 Dec 2013 21:46:43 +0000 (-0500) Subject: CRM-13960 - import - ensure empty fields don't throw validation errors X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=93582fe2bb40f2268a39a8aaa263c8e0c3c366be;p=civicrm-core.git 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 --- 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; }