//field is of type date or datetime
_civicrm_api3_validate_date($params, $fieldname, $fieldInfo);
break;
- case 32://blob
+
+ case 32://blob
_civicrm_api3_validate_html($params, $fieldname, $fieldInfo);
break;
- case CRM_Utils_Type::T_STRING:
+ case CRM_Utils_Type::T_STRING:
_civicrm_api3_validate_string($params, $fieldname, $fieldInfo);
break;
$session = &CRM_Core_Session::singleton();
$params[$fieldname] = $session->get('userID');
}
- if (CRM_Utils_Array::value('pseudoconstant', $fieldInfo) ) {
+ if (!empty($fieldInfo['options'])) {
$constant = CRM_Utils_Array::value('options', $fieldInfo);
if (is_numeric($params[$fieldname]) && !CRM_Utils_Array::value('FKClassName',$fieldInfo) && !array_key_exists($params[$fieldname], $fieldInfo['options'])) {
throw new API_Exception("$fieldname is not valid", 2001, array('error_field' => $fieldname,"type"=>"integer"));