Skip to content

Commit

Permalink
Using http_build_query in moreLikeThis API.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Katzki committed Apr 26, 2012
1 parent 8a3f13d commit ab2e6a1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/Elastica/Type.php
Expand Up @@ -258,11 +258,7 @@ public function moreLikeThis(Elastica_Document $doc, $args = array()) {

// mlt API needs args as http get params
if (!empty($args)) {
$argsStrings = array();
foreach ($args as $key => $value) {
$argsStrings[] = $key . '=' . $value;
}
$path .= '?' . implode('&', $argsStrings);
$path .= '?' . http_build_query($args);
}

$response = $this->request($path, Elastica_Request::GET);
Expand Down

0 comments on commit ab2e6a1

Please sign in to comment.