Skip to content

Commit

Permalink
comment on multi parameters workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Leandro Oniszczuk committed Aug 19, 2011
1 parent 71093eb commit badaa07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Indextank/Api.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ public function api_call($method, $url, $params = array(), $http_options = array
{ {
if ($method == "GET" || $method == "DELETE") { if ($method == "GET" || $method == "DELETE") {
$args = http_build_query($params); $args = http_build_query($params);

// remove the php special encoding of parameters
// see http://www.php.net/manual/en/function.http-build-query.php#78603
$args = preg_replace('/%5B(?:[0-9]|[1-9][0-9]+)%5D=/', '=', $args); $args = preg_replace('/%5B(?:[0-9]|[1-9][0-9]+)%5D=/', '=', $args);

$url .= '?' . $args; $url .= '?' . $args;
$args = ''; $args = '';
} else { } else {
Expand Down

0 comments on commit badaa07

Please sign in to comment.