1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 10:03:27 +01:00

Fix #1366 error when posting with form_params

HHVM return null when trying to build the query due to null being passed rather than an empty string.
This commit is contained in:
Ian Chadwick 2016-01-19 11:57:30 +00:00
parent 74fc390917
commit 479c3baf4e

View File

@ -291,7 +291,7 @@ class Client implements ClientInterface
. 'x-www-form-urlencoded requests, and the multipart '
. 'option to send multipart/form-data requests.');
}
$options['body'] = http_build_query($options['form_params'], null, '&');
$options['body'] = http_build_query($options['form_params'], '', '&');
unset($options['form_params']);
$options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded';
}