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:
Dani Sanchez
2013-12-12 08:38:02 +01:00
parent 67bcd262dd
commit 7deb2e0aa2
+1 -1
View File
@@ -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);
}