mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
fix bug wrt to CURLOPT_POSTFIELDS where if you passed it code like:
$fields = array('foo' => 'bar'); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); curl_exec($ch); as opposed to : curl_setopt($ch, CURLOPT_POSTFIELDS, array('foo' => 'bar')); you'll get a segv or no results, depending on the mood and cycle of the moon.
This commit is contained in:
parent
76766f2d31
commit
e8f984d77a
1 changed files with 1 additions and 1 deletions
|
@ -1084,7 +1084,7 @@ PHP_FUNCTION(curl_setopt)
|
|||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, string_key_len - 1,
|
||||
(ZVAL_REFCOUNT(*zvalue) > 1 ? CURLFORM_PTRCONTENTS : CURLFORM_COPYCONTENTS), postval,
|
||||
CURLFORM_COPYCONTENTS, postval,
|
||||
CURLFORM_CONTENTSLENGTH, Z_STRLEN_PP(current),
|
||||
CURLFORM_END);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue