From 19633ff96ffe0c60456fcc606be26fc76a120b0a Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 11 Feb 2022 16:36:02 +1100 Subject: [PATCH] [REF] Fix issue where spaces in payment_processor_type.name field causes issues with class output on form --- CRM/Financial/Form/FrontEndPaymentFormTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Financial/Form/FrontEndPaymentFormTrait.php b/CRM/Financial/Form/FrontEndPaymentFormTrait.php index 4ae5d30bacaa..9dbbf80d6233 100644 --- a/CRM/Financial/Form/FrontEndPaymentFormTrait.php +++ b/CRM/Financial/Form/FrontEndPaymentFormTrait.php @@ -185,7 +185,7 @@ protected function addPaymentProcessorFieldsToForm() { $optAttributes = []; foreach ($paymentProcessors as $ppKey => $ppval) { if ($ppKey > 0) { - $optAttributes[$ppKey]['class'] = 'payment_processor_' . strtolower($this->_paymentProcessors[$ppKey]['payment_processor_type']); + $optAttributes[$ppKey]['class'] = 'payment_processor_' . strtolower(CRM_Utils_String::munge($this->_paymentProcessors[$ppKey]['payment_processor_type'], '_', 1000)); } else { $optAttributes[$ppKey]['class'] = 'payment_processor_paylater';