-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue when POST data was given as a nested array for post, patc…
…h and put methods
- Loading branch information
1 parent
b30cf85
commit 71abfb4
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
* Read more {@link https://github.com/stefangabos/Zebra_cURL/ here}. | ||
* | ||
* @author Stefan Gabos <[email protected]> | ||
* @version 1.6.3 (last revision: October 03, 2024) | ||
* @version 1.6.4 (last revision: December 04, 2024) | ||
* @copyright © 2013 - 2024 Stefan Gabos | ||
* @license https://www.gnu.org/licenses/lgpl-3.0.txt GNU LESSER GENERAL PUBLIC LICENSE | ||
* @package Zebra_cURL | ||
|
@@ -1632,7 +1632,7 @@ public function patch($urls, $callback = '') { | |
CURLOPT_HEADER => 1, | ||
CURLOPT_NOBODY => 0, | ||
CURLOPT_POST => 0, | ||
CURLOPT_POSTFIELDS => isset($values['data']) ? $values['data'] : '', | ||
CURLOPT_POSTFIELDS => isset($values['data']) ? (is_array($values['data']) ? http_build_query($values['data'], '', '&') : $values['data']) : '', | ||
CURLOPT_BINARYTRANSFER => null, | ||
CURLOPT_HTTPGET => null, | ||
CURLOPT_FILE => null, | ||
|
@@ -1849,7 +1849,7 @@ public function post($urls, $callback = '') { | |
CURLOPT_HEADER => 1, | ||
CURLOPT_NOBODY => 0, | ||
CURLOPT_POST => 1, | ||
CURLOPT_POSTFIELDS => isset($values['data']) ? $values['data'] : '', | ||
CURLOPT_POSTFIELDS => isset($values['data']) ? (is_array($values['data']) ? http_build_query($values['data'], '', '&') : $values['data']) : '', | ||
CURLOPT_BINARYTRANSFER => null, | ||
CURLOPT_CUSTOMREQUEST => null, | ||
CURLOPT_HTTPGET => null, | ||
|
@@ -2085,7 +2085,7 @@ public function put($urls, $callback = '') { | |
CURLOPT_HEADER => 1, | ||
CURLOPT_NOBODY => 0, | ||
CURLOPT_POST => 0, | ||
CURLOPT_POSTFIELDS => isset($values['data']) ? $values['data'] : '', | ||
CURLOPT_POSTFIELDS => isset($values['data']) ? (is_array($values['data']) ? http_build_query($values['data'], '', '&') : $values['data']) : '', | ||
CURLOPT_BINARYTRANSFER => null, | ||
CURLOPT_HTTPGET => null, | ||
CURLOPT_FILE => null, | ||
|