Bug #12974 Updated: some curl bugs found & patched

From: Date: Mon, 03 Sep 2001 18:35:37 +0000
Subject: Bug #12974 Updated: some curl bugs found & patched
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-64995@lists.php.net to get a copy of this message
ID: 12974 Updated by: sterling Reported By: root@anight.org Old Status: Open Status: Closed Bug Type: cURL related Operating System: freebsd PHP Version: 4.0.6 New Comment: relevant patches committed, thanks. Previous Comments: ------------------------------------------------------------------------ [2001-08-27 07:47:31] root@anight.org 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; ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12974&edit=1

« previous php.dev (#64995) next »