From: Kevin Levie Date: Fri, 14 Aug 2015 15:04:35 +0000 (+0200) Subject: Allows to use arrays via the REST API X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=82a344c42cf7eaff2b896b0705a4a733e7a8e275;p=civicrm-core.git Allows to use arrays via the REST API --- diff --git a/api/class.api.php b/api/class.api.php index 7a5f72cdec..177da3eaff 100644 --- a/api/class.api.php +++ b/api/class.api.php @@ -177,9 +177,7 @@ class civicrm_api3 { public function remoteCall($entity, $action, $params = array()) { $fields = "key={$this->key}&api_key={$this->api_key}"; $query = $this->uri . "&entity=$entity&action=$action"; - foreach ($params as $k => $v) { - $fields .= "&$k=" . urlencode($v); - } + $fields .= '&' . http_build_query($params); if (function_exists('curl_init')) { // To facilitate debugging without leaking info, entity & action // are GET, other data is POST.