From e68c64eb45c1f63394562d52294986a411470d10 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sat, 20 Jul 2013 22:05:35 -0700 Subject: [PATCH] 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 --- api/v3/utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")); -- 2.25.1