CRM_Core_BAO_Setting - Generate better errors
authorTim Otten <totten@civicrm.org>
Fri, 28 Mar 2014 00:23:16 +0000 (17:23 -0700)
committerTim Otten <totten@civicrm.org>
Sun, 6 Apr 2014 04:26:33 +0000 (21:26 -0700)
CRM/Core/BAO/Setting.php

index fb291f0d995ce39649c073c5b7806a2a2db7cdab..6854949e0db05aaa372ee7b4e7f4c905e0cca95a 100644 (file)
@@ -509,7 +509,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
       list($name) = array_keys($settingParams);
       $getFieldsParams['name'] = $name;
     }
-    $fields = civicrm_api('setting','getfields', $getFieldsParams);
+    $fields = civicrm_api3('setting','getfields', $getFieldsParams);
     $invalidParams = (array_diff_key($settingParams, $fields['values']));
     if (!empty($invalidParams)) {
       throw new api_Exception(implode(',', $invalidParams) . " not valid settings");