CRM-13960 - import - ensure empty fields don't throw validation errors
authorJamie McClelland <jm@mayfirst.org>
Wed, 11 Dec 2013 21:46:43 +0000 (16:46 -0500)
committerJamie McClelland <jm@mayfirst.org>
Wed, 11 Dec 2013 21:46:43 +0000 (16:46 -0500)
----------------------------------------
* 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

index 3784549b6490e1767a18a47944f46a22ac41f14b..8174ec70020de565f3b3e6eb0d3f3fa61cfdfad7 100644 (file)
@@ -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;
       }