* Infolog - Fix merging empty custom date fields filled them with current date

This commit is contained in:
nathangray 2018-02-01 10:44:17 -07:00
parent 96a09ffd1f
commit e2baf61735

View File

@ -115,7 +115,7 @@ class infolog_merge extends Api\Storage\Merge
$array['#'.$name] = '';
}
// Format date cfs per user Api\Preferences
if($field['type'] == 'date' || $field['type'] == 'date-time')
if($array['#'.$name] && ($field['type'] == 'date' || $field['type'] == 'date-time'))
{
$this->date_fields[] = '#'.$name;
$array['#'.$name] = Api\DateTime::to($array['#'.$name], $field['type'] == 'date' ? true : '');