Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
return fwrite(data, size, nmemb, t->fp);
case PHP_CURL_RETURN:
if (length > 0) {
smart_str_appendl(&t->buf, data, (int) length);
smart_str_appendl(&t->buf, data, length);
}
break;
case PHP_CURL_USER: {
Expand Down Expand Up @@ -876,7 +876,7 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
} else if (!Z_ISUNDEF(retval)) {
_php_curl_verify_handlers(ch, /* reporterror */ true);
if (Z_TYPE(retval) == IS_STRING) {
length = MIN((int) (size * nmemb), Z_STRLEN(retval));
length = MIN(size * nmemb, Z_STRLEN(retval));
memcpy(data, Z_STRVAL(retval), length);
} else if (Z_TYPE(retval) == IS_LONG) {
length = Z_LVAL_P(&retval);
Expand Down Expand Up @@ -906,7 +906,7 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
/* Handle special case write when we're returning the entire transfer
*/
if (ch->handlers.write->method == PHP_CURL_RETURN && length > 0) {
smart_str_appendl(&ch->handlers.write->buf, data, (int) length);
smart_str_appendl(&ch->handlers.write->buf, data, length);
} else {
PHPWRITE(data, length);
}
Expand Down
Loading