From: Rohan Katkar Date: Fri, 17 Oct 2014 05:33:25 +0000 (+0530) Subject: Fix for CRM-15458 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8bc84e3c90ae80f5535d9bb263f5cd6f89d2ee19;p=civicrm-core.git Fix for CRM-15458 --- diff --git a/CRM/Activity/Import/Parser/Activity.php b/CRM/Activity/Import/Parser/Activity.php index 1d5a7d6e0a..bca07b0f93 100644 --- a/CRM/Activity/Import/Parser/Activity.php +++ b/CRM/Activity/Import/Parser/Activity.php @@ -265,13 +265,13 @@ class CRM_Activity_Import_Parser_Activity extends CRM_Activity_Import_Parser { foreach ($params as $key => $val) { if ($customFieldID = CRM_Core_BAO_CustomField::getKeyID($key)) { - if ($val) { + if ($key == 'activity_date_time' && $val) { $params[$key] = CRM_Utils_Date::formatDate($val, $dateType); } - elseif ($customFields[$customFieldID]['data_type'] == 'Date') { + elseif (!empty($customFields[$customFieldID]) && $customFields[$customFieldID]['data_type'] == 'Date') { CRM_Contact_Import_Parser_Contact::formatCustomDate($params, $params, $dateType, $key); } - elseif ($customFields[$customFieldID]['data_type'] == 'Boolean') { + elseif (!empty($customFields[$customFieldID]) && $customFields[$customFieldID]['data_type'] == 'Boolean') { $params[$key] = CRM_Utils_String::strtoboolstr($val); } }