From 91a332284b56766f7f0f89eb2daf408dc9cda502 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Fri, 22 Jun 2018 15:20:39 +0100 Subject: [PATCH] dev/core/issues/202, check if default currency is set --- CRM/Core/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index ce004204d6..abfbcdfcd4 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1868,7 +1868,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { $setDefaultCurrency = TRUE ) { $currencies = CRM_Core_OptionGroup::values('currencies_enabled'); - if (!array_key_exists($defaultCurrency, $currencies)) { + if (!empty($defaultCurrency) && !array_key_exists($defaultCurrency, $currencies)) { Civi::log()->warning('addCurrency: Currency ' . $defaultCurrency . ' is disabled but still in use!'); $currencies[$defaultCurrency] = $defaultCurrency; } -- 2.25.1