From: Coleman Watts Date: Mon, 6 Jul 2020 18:56:02 +0000 (-0400) Subject: dev/core#1853 - Fix validation errors when removing contact subtype X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d1bd4bec263abc71ff4f86b91e6952f385ede97a;p=civicrm-core.git dev/core#1853 - Fix validation errors when removing contact subtype --- diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index 3a1d69fc16..20d115f28d 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -367,8 +367,8 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { else { $contactSubType = $this->_contactSubType; // need contact sub type to build related grouptree array during post process - if (!empty($_POST['contact_sub_type'])) { - $contactSubType = $_POST['contact_sub_type']; + if (!empty($_POST['qfKey'])) { + $contactSubType = $_POST['contact_sub_type'] ?? NULL; } //only custom data has preprocess hence directly call it CRM_Custom_Form_CustomData::preProcess($this, NULL, $contactSubType,