From e09fc4a58f7031db57a0d1c5e0077ec80200f540 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Thu, 30 Jul 2015 13:47:15 +0300 Subject: [PATCH 1/2] Provide values for all arguments in http_build_query Without that http_build_query depend on system settings and may fail (drupal 6 in default config) --- lib/RetailCrm/Http/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/RetailCrm/Http/Client.php b/lib/RetailCrm/Http/Client.php index a3374dc..69ce1fb 100644 --- a/lib/RetailCrm/Http/Client.php +++ b/lib/RetailCrm/Http/Client.php @@ -61,7 +61,7 @@ class Client $path = $this->url . $path; if (self::METHOD_GET === $method && sizeof($parameters)) { - $path .= '?' . http_build_query($parameters); + $path .= '?' . http_build_query($parameters, '', '&'); } $ch = curl_init(); From aba730295d77c008b41026d4648e5c2dd00cedc5 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Wed, 23 Dec 2015 10:12:52 +0300 Subject: [PATCH 2/2] Update ApiClient.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Опечатка в storeInventoriesUpload --- lib/RetailCrm/ApiClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/RetailCrm/ApiClient.php b/lib/RetailCrm/ApiClient.php index 593c63f..e670b31 100644 --- a/lib/RetailCrm/ApiClient.php +++ b/lib/RetailCrm/ApiClient.php @@ -411,7 +411,7 @@ class ApiClient public function storeInventoriesUpload(array $offers, $site = null) { if (!sizeof($offers)) { - throw new \InvalidArgumentException('Parameter `offers` must contains array of the customers'); + throw new \InvalidArgumentException('Parameter `offers` must contains array of the offers'); } return $this->client->makeRequest(