Pārlūkot izejas kodu

Fixed incorrect default values

Jan Oris 2 gadi atpakaļ
vecāks
revīzija
0b2cc89ed5
4 mainītis faili ar 8 papildinājumiem un 4 dzēšanām
  1. 4 0
      CHANGELOG.md
  2. 1 1
      README.md
  3. 1 1
      composer.json
  4. 2 2
      src/Builder.php

+ 4 - 0
CHANGELOG.md

@@ -2,6 +2,10 @@
 
 All Notable changes to `ixudra/curl` will be documented in this file
 
+## 6.22.1 - 2022-07-31
+### Fixed
+- Use correct default values for http_build_query
+
 ## 6.22.0 - 2021-11-14
 ### Added
 - Added HEAD request support

+ 1 - 1
README.md

@@ -8,7 +8,7 @@ ixudra/curl
 
 ![Ixudra Curl](https://repository-images.githubusercontent.com/18486198/cd2b2080-de01-11e9-8fb1-e64ffe5e9816)
 
-Custom PHP cURL library for the Laravel 4 or 5 framework - developed by [Ixudra](http://ixudra.be).
+Custom PHP cURL library for the Laravel framework - developed by [Ixudra](http://ixudra.be).
 
 The package provides an easy interface for sending cURL requests from your PHP web application. The package provides an 
 intuitive, fluent interface similar the Laravel query builder to easily configure the request. Additionally, There are 

+ 1 - 1
composer.json

@@ -1,7 +1,7 @@
 {
     "name": "ixudra/curl",
     "description": "Custom PHP Curl library for the Laravel framework - developed by Ixudra",
-    "version": "6.22.0",
+    "version": "6.22.1",
     "keywords": ["Ixudra", "Laravel", "Curl"],
     "homepage": "http://ixudra.be",
     "license": "MIT",

+ 2 - 2
src/Builder.php

@@ -665,7 +665,7 @@ class Builder {
             $arrayKey = constant( 'CURLOPT_' . $key );
 
             if( !$this->packageOptions[ 'containsFile' ] && $key === 'POSTFIELDS' && is_array( $value ) ) {
-                $results[ $arrayKey ] = http_build_query( $value, null, '&' );
+                $results[ $arrayKey ] = http_build_query( $value );
             } else {
                 $results[ $arrayKey ] = $value;
             }
@@ -688,7 +688,7 @@ class Builder {
     {
         $parameterString = '';
         if( is_array($this->packageOptions[ 'data' ]) && count($this->packageOptions[ 'data' ]) != 0 ) {
-            $parameterString = '?'. http_build_query( $this->packageOptions[ 'data' ], null, '&' );
+            $parameterString = '?'. http_build_query( $this->packageOptions[ 'data' ] );
         }
 
         return $this->curlOptions[ 'URL' ] .= $parameterString;