foreach ($params as $key => $value) {
[$customFieldID, $customValueID] = CRM_Core_BAO_CustomField::getKeyID($key, TRUE);
if ($customFieldID && (!is_null($value))) {
- if ($checkCheckBoxField && !empty($fields['custom_' . $customFieldID]) && $fields['custom_' . $customFieldID]['html_type'] == 'CheckBox') {
+ if ($checkCheckBoxField && isset($fields['custom_' . $customFieldID]) && $fields['custom_' . $customFieldID]['html_type'] == 'CheckBox') {
formatCheckBoxField($value, 'custom_' . $customFieldID, $entity);
}
return;
}
+ if (is_array($checkboxFieldValue) && empty($checkboxFieldValue)) {
+ $checkboxFieldValue = '';
+ return;
+ }
$options = $options['values'];
$validValue = TRUE;
if (is_array($checkboxFieldValue)) {