mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 12:14:36 +00:00
Fixes issue #6 "Integer params inside data array aren't taken in account"
Makes the http_build_multi_query method to be also able to add integers inside the data array Signed-off-by: Dani Sancas <dani@sancas.es>
This commit is contained in:
+1
-1
@@ -87,7 +87,7 @@ class Curl {
|
||||
$is_array_assoc = is_array_assoc($data);
|
||||
|
||||
foreach ($data as $k => $value) {
|
||||
if (is_string($value)) {
|
||||
if (is_string($value) || is_int($value)) {
|
||||
$brackets = $is_array_assoc ? '[' . $k . ']' : '[]';
|
||||
$query[] = urlencode(is_null($key) ? $k : $key . $brackets) . '=' . rawurlencode($value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user