CRM-20962 Fix issue where we were passing through a string when it should be an array...
authorSeamus Lee <seamuslee001@gmail.com>
Tue, 25 Jul 2017 07:29:48 +0000 (17:29 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Fri, 28 Jul 2017 05:21:17 +0000 (15:21 +1000)
CRM/Core/BAO/Setting.php

index efc0ff6b390d7919d7f358186bec2ad6f665f9a0..9a65f0a15b9162fa98ef3e9cae9036a809e6a56c 100644 (file)
@@ -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]);
     }