From b740ee4b97e45011ccdf5478df17056da760e122 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Fri, 9 Mar 2018 11:39:51 +0000 Subject: [PATCH] If a currency has been disabled allow the form to be submitted --- CRM/Core/Form.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index c5768709cf..3d52eb9b7b 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1804,6 +1804,10 @@ class CRM_Core_Form extends HTML_QuickForm_Page { $setDefaultCurrency = TRUE ) { $currencies = CRM_Core_OptionGroup::values('currencies_enabled'); + if (!array_key_exists($defaultCurrency, $currencies)) { + Civi::log()->warning('addCurrency: Currency ' . $defaultCurrency . ' is disabled but still in use!'); + $currencies[$defaultCurrency] = $defaultCurrency; + } $options = array('class' => 'crm-select2 eight'); if (!$required) { $currencies = array('' => '') + $currencies; -- 2.25.1