From c884e2e48048b3fba724a56396bbfd724571712a Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Wed, 23 Nov 2022 10:19:41 +0000 Subject: [PATCH] fixes dash line appended to the contribution amounts if label is empty --- CRM/Price/BAO/PriceField.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Price/BAO/PriceField.php b/CRM/Price/BAO/PriceField.php index 05821e18f9..108c150324 100644 --- a/CRM/Price/BAO/PriceField.php +++ b/CRM/Price/BAO/PriceField.php @@ -382,7 +382,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { foreach ($customOption as $opId => $opt) { $preHelpText = $postHelpText = ''; - $opt['label'] = '' . $opt['label'] . ''; + $opt['label'] = !empty($opt['label']) ? $opt['label'] . '' . $opt['label'] . '' : ''; if (!empty($opt['help_pre'])) { $preHelpText = '' . $opt['help_pre'] . ''; } @@ -567,7 +567,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { $max_value = CRM_Utils_Array::value('max_value', $opt, ''); $preHelpText = $postHelpText = ''; - $opt['label'] = '' . $opt['label'] . ''; + $opt['label'] = !empty($opt['label']) ? $opt['label'] . '' . $opt['label'] . '' : ''; if (!empty($opt['help_pre'])) { $preHelpText = '' . $opt['help_pre'] . ''; } -- 2.25.1