From: Tim Otten Date: Fri, 28 Mar 2014 00:23:16 +0000 (-0700) Subject: CRM_Core_BAO_Setting - Generate better errors X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0056ab2178a546c41791e88da95e3fa6cbdce6a5;p=civicrm-core.git CRM_Core_BAO_Setting - Generate better errors --- diff --git a/CRM/Core/BAO/Setting.php b/CRM/Core/BAO/Setting.php index fb291f0d99..6854949e0d 100644 --- a/CRM/Core/BAO/Setting.php +++ b/CRM/Core/BAO/Setting.php @@ -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");