Skip to content
Browse files

Using http_build_query in moreLikeThis API.

  • Loading branch information...
1 parent 8a3f13d commit ab2e6a136b8792b1e2dbc0b81cab0ec064b919a7 Robert Katzki committed
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/Elastica/Type.php
View
6 lib/Elastica/Type.php
@@ -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);

0 comments on commit ab2e6a1

Please sign in to comment.
Something went wrong with that request. Please try again.