From 98c9d217727a814097587a668f6f85d51eb3421d Mon Sep 17 00:00:00 2001 From: Monish Deb Date: Mon, 21 Nov 2022 13:42:05 +0530 Subject: [PATCH] dev/core#3999 : Unable to delete price field --- CRM/Price/Page/Field.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CRM/Price/Page/Field.php b/CRM/Price/Page/Field.php index 72ab8d481a..c1a70040fd 100644 --- a/CRM/Price/Page/Field.php +++ b/CRM/Price/Page/Field.php @@ -231,12 +231,11 @@ class CRM_Price_Page_Field extends CRM_Core_Page { if ($this->_sid) { $usedByDefaults = [ - 'civicrm_event' => FALSE, 'civicrm_event' => FALSE, 'civicrm_contribution_page' => FALSE, ]; $usedBy = CRM_Price_BAO_PriceSet::getUsedBy($this->_sid); - $this->assign('usedBy', array_merge($usedByDefaults, $usedBy)); + $this->assign('usedBy', array_intersect_key($usedByDefaults, $usedBy)); $this->_isSetReserved = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_sid, 'is_reserved'); $this->assign('isReserved', $this->_isSetReserved); -- 2.25.1