Unverified Commit 5528fa66 authored by eileen's avatar eileen 🎱 Committed by GitHub

Merge pull request #11795 from mattwire/form_disabled_currency

dev/financial/5 If a currency has been disabled allow the form to be submitted
parents 84c8a582 b740ee4b
......@@ -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