From 50f57d6cbb8bb87b4e1d7cf0b3d9c76b143231ea Mon Sep 17 00:00:00 2001 From: foobar Date: Mon, 26 Jan 2004 00:18:25 +0000 Subject: [PATCH] MFH: - Fixed bug #27040 (passing an array of form-fields to CURLOPT_POSTFIELDS does not work). --- NEWS | 8 +++++--- ext/curl/curl.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index f72b0d5c74..fefe73c6fb 100644 --- a/NEWS +++ b/NEWS @@ -1,12 +1,14 @@ PHP 4 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Jan 2004, Version 4.3.5 -- Improved the sybase_ct module (Timm) +- Improved the sybase_ct module: (Timm) . Added ability to define a message handler not only globally, but also per connection. - . Made sybct.login_timeout changeable at runtime. - . Added ini option sybct.packet_size which lets you control the packet size. + . Added "sybct.packet_size" php.ini option. + . Changed "sybct.login_timeout" php.ini option changeable at runtime. . Fixed memory leak in sybase_set_message_handler(). +- Fixed bug #27040 (passing an array of form-fields to CURLOPT_POSTFIELDS + does not work). (Ilia, Jani) - Fixed bug #26974 (rename() doesn't check the destination file against safe_mode/open_basedir). (Ilia) - Fixed bug #26973 (*printf() '+' modifier broken). (Jani) diff --git a/ext/curl/curl.c b/ext/curl/curl.c index ead6cd148b..e583a675cd 100644 --- a/ext/curl/curl.c +++ b/ext/curl/curl.c @@ -886,7 +886,7 @@ PHP_FUNCTION(curl_setopt) error = curl_formadd(&first, &last, CURLFORM_COPYNAME, string_key, CURLFORM_NAMELENGTH, string_key_len - 1, - CURLFORM_PTRCONTENTS, postval, + (ZVAL_REFCOUNT(*zvalue) > 1 ? CURLFORM_PTRCONTENTS : CURLFORM_COPYCONTENTS), postval, CURLFORM_CONTENTSLENGTH, Z_STRLEN_PP(current), CURLFORM_END); } -- 2.50.1