ID: 12974
Updated by: sterling
Reported By: [EMAIL PROTECTED]
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] [EMAIL PROTECTED]

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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to