'subject',
'absolute_date',
'group_id',
- 'record_activity',
'limit_to',
'mode',
'sms_provider_id',
$params[$key] = $values[$key] ?? NULL;
}
- $params['is_repeat'] = CRM_Utils_Array::value('is_repeat', $values, 0);
+ // set boolean fields to false if not set.
+ foreach (['record_activity', 'is_repeat', 'is_active'] as $boolFieldName) {
+ $params[$boolFieldName] = $values[$boolFieldName] ?? 0;
+ }
$moreKeys = [
'start_action_offset',
$params['entity_status'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, $entity_status);
}
- $params['is_active'] = CRM_Utils_Array::value('is_active', $values, 0);
-
if (empty($values['is_repeat'])) {
$params['repetition_frequency_unit'] = 'null';
$params['repetition_frequency_interval'] = 'null';