]> granicus.if.org Git - php/commitdiff
- Fixed bug #27040 (passing an array of form-fields to CURLOPT_POSTFIELDS does not...
authorfoobar <sniper@php.net>
Mon, 26 Jan 2004 00:16:16 +0000 (00:16 +0000)
committerfoobar <sniper@php.net>
Mon, 26 Jan 2004 00:16:16 +0000 (00:16 +0000)
ext/curl/interface.c

index 959dc159b4e36643df0df78aba9648896339f673..c823f78ee88a0001a1d5bf19f4a722e586c752be 100644 (file)
@@ -1001,7 +1001,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);
                                        }