|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-09-03 14:35 UTC] sterling@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 02:00:01 2025 UTC |
i have found & patched php interface functions to curl. i have no time to commit it to cvs, so here's the diff: --- curl.c.orig Mon Aug 27 15:51:37 2001 +++ curl.c Mon Aug 27 15:42:13 2001 @@ -488,6 +488,10 @@ alloc_curl_handle(&ch); ch->cp = curl_easy_init(); + + memset(ch->err.str, 0, sizeof(ch->err.str)); + ch->err.no = 0; + if (! ch->cp) { php_error(E_WARNING, "Cannot initialize a new cURL handle"); RETURN_FALSE; @@ -526,7 +530,7 @@ **zoption, **zvalue; php_curl *ch; - CURLcode error; + CURLcode error = 0; int option; if (ZEND_NUM_ARGS() != 3 || @@ -633,6 +637,7 @@ convert_to_long_ex(zvalue); ch->handlers->write->type = PHP_CURL_BINARY; + break; case CURLOPT_WRITEFUNCTION: zval_add_ref(zvalue); ch->handlers->write->func = *zvalue;