From 3f672c59a0a73065dc9fae3fed5ed21cd67bc731 Mon Sep 17 00:00:00 2001 From: Matthias Noback Date: Wed, 29 Jan 2014 10:53:49 +0100 Subject: [PATCH] Build HTTP queries with '&' This fixes #4. --- src/MatthiasNoback/MicrosoftOAuth/AccessTokenProvider.php | 2 +- .../ApiCall/AbstractMicrosoftTranslatorApiCall.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MatthiasNoback/MicrosoftOAuth/AccessTokenProvider.php b/src/MatthiasNoback/MicrosoftOAuth/AccessTokenProvider.php index 068dc36..47c449e 100644 --- a/src/MatthiasNoback/MicrosoftOAuth/AccessTokenProvider.php +++ b/src/MatthiasNoback/MicrosoftOAuth/AccessTokenProvider.php @@ -79,7 +79,7 @@ private function authorize($scope, $grantType) $response = $this->browser->post( self::OAUTH_URL, array(), - http_build_query($requestParameters) + http_build_query($requestParameters, null, '&') ); } catch (\Exception $previous) { diff --git a/src/MatthiasNoback/MicrosoftTranslator/ApiCall/AbstractMicrosoftTranslatorApiCall.php b/src/MatthiasNoback/MicrosoftTranslator/ApiCall/AbstractMicrosoftTranslatorApiCall.php index abcbd14..a8e2f74 100644 --- a/src/MatthiasNoback/MicrosoftTranslator/ApiCall/AbstractMicrosoftTranslatorApiCall.php +++ b/src/MatthiasNoback/MicrosoftTranslator/ApiCall/AbstractMicrosoftTranslatorApiCall.php @@ -16,7 +16,7 @@ public function getUrl() { $url = self::HTTP_API_URL.$this->getApiMethodName(); if (null !== $queryParameters = $this->getQueryParameters()) { - $url .= '?'.http_build_query($queryParameters); + $url .= '?'.http_build_query($queryParameters, null, '&'); } return $url;