]> granicus.if.org Git - php/commitdiff
MFH
authorSterling Hughes <sterling@php.net>
Thu, 4 Apr 2002 00:04:25 +0000 (00:04 +0000)
committerSterling Hughes <sterling@php.net>
Thu, 4 Apr 2002 00:04:25 +0000 (00:04 +0000)
ext/curl/curl.c

index b381ebfdf69a9f78f0bddc28adc79c08750488c5..55971e5c3cc63bd2609e6cd01a00ecffdfef60a5 100644 (file)
@@ -790,8 +790,8 @@ PHP_FUNCTION(curl_setopt)
                                }
                        }
 
+                       SAVE_CURL_ERROR(ch, error);
                        if (error != CURLE_OK) {
-                               SAVE_CURL_ERROR(ch, error);
                                RETURN_FALSE;
                        }
 
@@ -849,9 +849,9 @@ PHP_FUNCTION(curl_setopt)
                break;
        }
        }
-       
+
+       SAVE_CURL_ERROR(ch, error);
        if (error != CURLE_OK) {
-               SAVE_CURL_ERROR(ch, error);
                RETURN_FALSE;
        } else {
                RETURN_TRUE;
@@ -874,10 +874,10 @@ PHP_FUNCTION(curl_exec)
        ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
 
        error = curl_easy_perform(ch->cp);
+       SAVE_CURL_ERROR(ch, error);
        if (error != CURLE_OK) {
                if (ch->handlers->write->buf.len > 0)
                        smart_str_free(&ch->handlers->write->buf);
-               SAVE_CURL_ERROR(ch, error);
                RETURN_FALSE;
        }