From fdb96639701046e04a2b7f7ab4cf07474095dc5d Mon Sep 17 00:00:00 2001 From: lsolesen Date: Thu, 7 Apr 2016 14:10:40 +0000 Subject: [PATCH] fixes gh-16 http_build_query() implementation --- QuickPay/API/Request.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/QuickPay/API/Request.php b/QuickPay/API/Request.php index 618a41d..d0bf6d1 100644 --- a/QuickPay/API/Request.php +++ b/QuickPay/API/Request.php @@ -48,9 +48,9 @@ public function get($path, $query = array()) // Add query parameters to $path? if (!empty($query)) { if (strpos($path, '?') === false) { - $path .= '?' . http_build_query($query); + $path .= '?' . http_build_query($query, '', '&'); } else { - $path .= ini_get('arg_separator.output') . http_build_query($query); + $path .= ini_get('arg_separator.output') . http_build_query($query, '', '&'); } } @@ -159,7 +159,7 @@ protected function execute($request_type, $form = array()) // If additional data is delivered, we will send it along with the API request if (is_array($form) && ! empty($form)) { - curl_setopt($this->client->ch, CURLOPT_POSTFIELDS, http_build_query($form)); + curl_setopt($this->client->ch, CURLOPT_POSTFIELDS, http_build_query($form, '', '&')); } // Store received headers in temporary memory file, remember sent headers