From: Seamus Lee Date: Tue, 25 Jul 2017 07:29:48 +0000 (+1000) Subject: CRM-20962 Fix issue where we were passing through a string when it should be an array... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4cf5500c93fca0bf9687b762ec6e834e46eb2bcd;p=civicrm-core.git CRM-20962 Fix issue where we were passing through a string when it should be an array causing error in php7.1 --- diff --git a/CRM/Core/BAO/Setting.php b/CRM/Core/BAO/Setting.php index efc0ff6b39..9a65f0a15b 100644 --- a/CRM/Core/BAO/Setting.php +++ b/CRM/Core/BAO/Setting.php @@ -199,6 +199,9 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { $fieldsToSet = self::validateSettingsInput($params, $fields); foreach ($fieldsToSet as $settingField => &$settingValue) { + if (empty($fields['values'][$settingField])) { + $fields['values'][$settingField] = array(); + } self::validateSetting($settingValue, $fields['values'][$settingField]); }