Skip to content
Snippets Groups Projects
Unverified Commit 45e22376 authored by yashodha's avatar yashodha Committed by GitHub
Browse files

Merge pull request #23521 from eileenmcnaughton/dead

Ensure setting deceased date sets is_deceased in the BAO
parents 72920ca9 20fd45af
Branches
Tags
No related merge requests found
......@@ -138,6 +138,9 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact implements Civi\Co
}
$params = array_merge($defaults, $params);
if (!empty($params['deceased_date']) && $params['deceased_date'] !== 'null') {
$params['is_deceased'] = TRUE;
}
$allNull = $contact->copyValues($params);
$contact->id = $contactID;
......
......@@ -67,8 +67,6 @@ class CRM_Contact_BAO_Individual extends CRM_Contact_DAO_Contact {
$params['individual_suffix'] = $suffix = CRM_Core_PseudoConstant::getLabel('CRM_Contact_DAO_Contact', 'suffix_id', $suffix_id);
}
$params['is_deceased'] = CRM_Utils_Array::value('is_deceased', $params, FALSE);
$individual = NULL;
if ($contact->id) {
$individual = new CRM_Contact_BAO_Contact();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment