From b0e240d9cd1f884e6e67381b50caefb5ea814856 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 13 Jul 2020 19:06:27 +1200 Subject: [PATCH] dev/core#1861 fix failure to unset location_type_id when saving uffield https://lab.civicrm.org/dev/core/-/issues/1861 If this is a regression it probably from 2017 https://github.com/civicrm/civicrm-core/commit/2e74ff5574027b2ce84177b82884ebd7c9b87fd1#diff-1911d0c1a896701ba9aa044181f5972bR556 --- CRM/UF/Form/Field.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/UF/Form/Field.php b/CRM/UF/Form/Field.php index 4476ef7303..d99adfe451 100644 --- a/CRM/UF/Form/Field.php +++ b/CRM/UF/Form/Field.php @@ -532,7 +532,7 @@ class CRM_UF_Form_Field extends CRM_Core_Form { } elseif ($params['field_name'][2] == 0) { // 0 is Primary location type - $apiFormattedParams['location_type_id'] = NULL; + $apiFormattedParams['location_type_id'] = ''; } if (!empty($params['field_name'][3])) { $apiFormattedParams['phone_type_id'] = $params['field_name'][3]; -- 2.25.1