sterling Thu Jul 1 02:50:46 2004 EDT
Modified files:
/php-src/ext/curl interface.c
Log:
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.
http://cvs.php.net/diff.php/php-src/ext/curl/interface.c?r1=1.45&r2=1.46&ty=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.45 php-src/ext/curl/interface.c:1.46
--- php-src/ext/curl/interface.c:1.45 Thu Apr 29 12:25:42 2004
+++ php-src/ext/curl/interface.c Thu Jul 1 02:50:46 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interface.c,v 1.45 2004/04/29 16:25:42 iliaa Exp $ */
+/* $Id: interface.c,v 1.46 2004/07/01 06:50:46 sterling Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -1084,7 +1084,7 @@
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);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php