Commit b740ee4b authored by Matthew Wire's avatar Matthew Wire

If a currency has been disabled allow the form to be submitted

parent c6acb33b
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment