}
// Fix for preferred communication method.
- $prefComm = CRM_Utils_Array::value('preferred_communication_method', $params);
+ $prefComm = CRM_Utils_Array::value('preferred_communication_method', $params, '');
if ($prefComm && is_array($prefComm)) {
unset($params['preferred_communication_method']);
$newPref = array();
}
}
- $prefComm = $newPref;
- if (is_array($prefComm) && !empty($prefComm)) {
- $prefComm = CRM_Core_DAO::VALUE_SEPARATOR . implode(CRM_Core_DAO::VALUE_SEPARATOR, array_keys($prefComm)) . CRM_Core_DAO::VALUE_SEPARATOR;
- $contact->preferred_communication_method = $prefComm;
- }
- else {
- $contact->preferred_communication_method = '';
- }
+ $prefComm = CRM_Core_DAO::VALUE_SEPARATOR . implode(CRM_Core_DAO::VALUE_SEPARATOR, array_keys($newPref)) . CRM_Core_DAO::VALUE_SEPARATOR;
}
+ $contact->preferred_communication_method = $prefComm;
+
$allNull = $contact->copyValues($params);
$contact->id = CRM_Utils_Array::value('contact_id', $params);
// Edit demographics
$this->inlineEdit('crm-demographic-content', array(
- 'civicrm_gender_Female_1' => 1,
+ "xpath=//div[@class='crm-clear']/div[1]/div[@class='crm-content']/label[text()='Female']" => true,
'is_deceased' => 1,
'birth_date' => 'date: Jan 1 1970',
), 'no_open');