From 2bb408460208bf9dc479214a5fc603e792820aeb Mon Sep 17 00:00:00 2001 From: Tom Anderson Date: Mon, 28 Apr 2014 14:36:18 -0700 Subject: [PATCH] Don't use PHP constant; use constant value instead to support hhvm --- src/Provider/AbstractProvider.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Provider/AbstractProvider.php b/src/Provider/AbstractProvider.php index 3e4894e..3642475 100644 --- a/src/Provider/AbstractProvider.php +++ b/src/Provider/AbstractProvider.php @@ -32,7 +32,10 @@ abstract class AbstractProvider protected $httpClient; - /** @var int This represents: PHP_QUERY_RFC1738. The default encryption type for the http_build_query setup */ + /** + * @var int This represents: PHP_QUERY_RFC1738, which is the default value for php 5.4 + * and the default encryption type for the http_build_query setup + */ protected $httpBuildEncType = 1; public function __construct($options = array()) @@ -91,7 +94,7 @@ abstract class AbstractProvider 'approval_prompt' => 'auto' ); - return $this->urlAuthorize() . '?' . $this->httpBuildQuery($params, '', '&', PHP_QUERY_RFC1738); + return $this->urlAuthorize() . '?' . $this->httpBuildQuery($params, '', '&'); } // @codeCoverageIgnoreStart @@ -129,7 +132,7 @@ abstract class AbstractProvider // @codeCoverageIgnoreStart // No providers included with this library use get but 3rd parties may $client = $this->getHttpClient(); - $client->setBaseUrl($this->urlAccessToken() . '?' . $this->httpBuildQuery($requestParams, '', '&', PHP_QUERY_RFC1738)); + $client->setBaseUrl($this->urlAccessToken() . '?' . $this->httpBuildQuery($requestParams, '', '&')); $request = $client->send(); $response = $request->getBody(); break;