From: Kurund Jalmi Date: Wed, 23 Nov 2022 10:19:41 +0000 (+0000) Subject: fixes dash line appended to the contribution amounts if label is empty X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c884e2e48048b3fba724a56396bbfd724571712a;p=civicrm-core.git fixes dash line appended to the contribution amounts if label is empty --- 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'] . ''; }