From: Sterling Hughes Date: Wed, 3 Apr 2002 23:59:36 +0000 (+0000) Subject: fix bug #15150, thanks to daniel at haxx.se for the fix X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~899 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7201d8b54e8ba72864e3836b228f9a5cfafe388b;p=php fix bug #15150, thanks to daniel at haxx.se for the fix --- diff --git a/ext/curl/curl.c b/ext/curl/curl.c index 9406138fb9..17fc018f2e 100644 --- a/ext/curl/curl.c +++ b/ext/curl/curl.c @@ -797,8 +797,8 @@ PHP_FUNCTION(curl_setopt) } } + SAVE_CURL_ERROR(ch, error); if (error != CURLE_OK) { - SAVE_CURL_ERROR(ch, error); RETURN_FALSE; } @@ -856,9 +856,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; @@ -881,10 +881,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; }