From 9465d059aad2472605172dd013abfee1a25b3f6e Mon Sep 17 00:00:00 2001 From: Eileen Date: Thu, 24 Oct 2013 20:13:27 +1300 Subject: [PATCH] CRM-13593 api chaining - fix mulitple entity chainging ---------------------------------------- * CRM-13593: chaining multiple object with the API is broken http://issues.civicrm.org/jira/browse/CRM-13593 --- api/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api.php b/api/api.php index f9e6970e19..b976ebf51d 100644 --- a/api/api.php +++ b/api/api.php @@ -509,7 +509,7 @@ function _civicrm_api_call_nested_api(&$params, &$result, $action, $entity, $ver if (array_key_exists(0, $newparams)) { $genericParams = $subParams; // it is a numerically indexed array - ie. multiple creates - foreach ($newparams as $entity => $entityparams) { + foreach ($newparams as $entityparams) { $subParams = array_merge($genericParams, $entityparams); _civicrm_api_replace_variables($subAPI[1], $subaction, $subParams, $result['values'][$idIndex], $separator); $result['values'][$result['id']][$field][] = civicrm_api($subEntity, $subaction, $subParams); -- 2.25.1