From 6ebe79c1a6917ddf6d67c233b5d1b9cf9c2121c0 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Thu, 9 Jan 2014 12:08:33 -0500 Subject: [PATCH] CRM-13252 exit nested api if getfields/getoptions action --- api/api.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/api.php b/api/api.php index b976ebf51d..b91940a033 100644 --- a/api/api.php +++ b/api/api.php @@ -444,6 +444,12 @@ function _civicrm_api_get_camel_name($entity, $version = NULL) { */ function _civicrm_api_call_nested_api(&$params, &$result, $action, $entity, $version) { $entity = _civicrm_api_get_entity_name_from_camel($entity); + + //we don't need to worry about nested api in the getfields/getoptions actions, so just return immediately + if (in_array(strtolower($action), array('getfields', 'getoptions'))) { + return; + } + if(strtolower($action) == 'getsingle'){ // I don't understand the protocol here, but we don't want // $result to be a recursive array -- 2.25.1