]> granicus.if.org Git - php/commitdiff
- MFH: Fixed bug #47616 (curl keeps crashing)
authorFelipe Pena <felipe@php.net>
Mon, 16 Mar 2009 15:09:51 +0000 (15:09 +0000)
committerFelipe Pena <felipe@php.net>
Mon, 16 Mar 2009 15:09:51 +0000 (15:09 +0000)
NEWS
ext/curl/interface.c

diff --git a/NEWS b/NEWS
index 723a26df161cb967c3ba09462d8bdbb48f14129a..7eddaab34de2f43bf6b731facb6e78d109edd7d3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ PHP                                                                        NEWS
 - Fixed bug #47667 (ZipArchive::OVERWRITE seems to have no effect). (Mikko,Pierre)
 - Fixed bug #47639 (pg_copy_from() WARNING: nonstandard use of \\ in a string
   literal). (Ilia)
+- Fixed bug #47616 (curl keeps crashing). (Felipe)
 - Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware). (Ilia)
 - Fixed bug #47546 (Default value for limit parameter in explode is 0, not -1).
   (Kalle)
index 0834c3b9a63da28f0f114372529bdb1d48dbae2d..50bb162853fc6a3432a0952c96422aefdcefe151 100644 (file)
@@ -1572,6 +1572,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
                        } else {
 #if LIBCURL_VERSION_NUM >= 0x071101
                                /* with curl 7.17.0 and later, we can use COPYPOSTFIELDS, but we have to provide size before */
+                               convert_to_string_ex(zvalue);
                                error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDSIZE, Z_STRLEN_PP(zvalue));
                                error = curl_easy_setopt(ch->cp, CURLOPT_COPYPOSTFIELDS, Z_STRVAL_PP(zvalue));
 #else