From d661281df4ba92180e3fdee818e2afebd0a38953 Mon Sep 17 00:00:00 2001 From: eileen <eileen@fuzion.co.nz> Date: Thu, 1 Aug 2013 10:43:17 +1200 Subject: [PATCH] CRM-13016 wrong version of this fn in 4.3 --- api/api.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/api.php b/api/api.php index 3ade1a5b39..0f70507ad1 100644 --- a/api/api.php +++ b/api/api.php @@ -247,12 +247,13 @@ function _civicrm_api_resolve($apiRequest) { * @return array * */ -function civicrm_api3($entity, $action, $params){ +function civicrm_api3($entity, $action, $params) { $params['version'] = 3; $result = civicrm_api($entity, $action, $params); - if($result['is_error']){ + if(is_array($result) && !empty($result['is_error'])){ throw new CiviCRM_API3_Exception($result['error_message'], CRM_Utils_Array::value('error_code', $result, 'undefined'), $result); } + return $result; } /** -- GitLab