Merge pull request #7063 from monishdeb/CRM-17434
[civicrm-core.git] / api / class.api.php
index 7a5f72cdec04c95a304e4a94ea056d892d2cf0ee..177da3eaff8cbbbf8dccc2e1ee453df6d1699bc4 100644 (file)
@@ -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.