From: Tim Otten Date: Sun, 21 Jul 2013 05:05:35 +0000 (-0700) Subject: CRM-12556 - Fix regressions in api_v3_RelationshipTest and api_v3_ActivityTest X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e68c64eb45c1f63394562d52294986a411470d10;p=civicrm-core.git CRM-12556 - Fix regressions in api_v3_RelationshipTest and api_v3_ActivityTest ---------------------------------------- * CRM-12556: Assign api_key for a user via command-line http://issues.civicrm.org/jira/browse/CRM-12556 --- diff --git a/api/v3/utils.php b/api/v3/utils.php index 9d25ac3fec..f0e714b7e0 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -1472,7 +1472,7 @@ function _civicrm_api3_validate_integer(&$params, &$fieldName, &$fieldInfo, $ent //if fieldname exists in params if (CRM_Utils_Array::value($fieldName, $params)) { // if value = 'user_contact_id' (or similar), replace value with contact id - if (!is_numeric($params[$fieldName])) { + if (!is_numeric($params[$fieldName]) && is_scalar($params[$fieldName])) { $realContactId = _civicrm_api3_resolve_contactID($params[$fieldName]); if ('unknown-user' === $realContactId) { throw new API_Exception("\"$fieldName\" \"{$params[$fieldName]}\" cannot be resolved to a contact ID", 2002, array('error_field' => $fieldName,"type"=>"integer"));