$fields = civicrm_api('setting','getfields', $getFieldsParams);
$invalidParams = (array_diff_key($settingParams, $fields['values']));
if (!empty($invalidParams)) {
- throw new api_Exception(implode(',', $invalidParams) . " not valid settings");
+ throw new API_Exception(implode(',', $invalidParams) . " not valid settings");
}
if (!empty($settingParams)) {
$filteredFields = array_intersect_key($settingParams, $fields['values']);
else {
list($class,$fn) = explode('::',$fieldSpec['validate_callback']);
if (!$class::$fn($value,$fieldSpec)) {
- throw new api_Exception("validation failed for {$fieldSpec['name']} = $value based on callback {$fieldSpec['validate_callback']}");
+ throw new API_Exception("validation failed for {$fieldSpec['name']} = $value based on callback {$fieldSpec['validate_callback']}");
}
}
}
*/
static function validateBoolSetting(&$value, $fieldSpec) {
if (!CRM_Utils_Rule::boolean($value)) {
- throw new api_Exception("Boolean value required for {$fieldSpec['name']}");
+ throw new API_Exception("Boolean value required for {$fieldSpec['name']}");
}
if (!$value) {
$value = 0;