Skip to content

Commit 65ae274

Browse files
committed
Explicitly cast to curl_off_t
1 parent 6c3ba33 commit 65ae274

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ext/curl/interface.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2170,15 +2170,15 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
21702170
/* no need to build the mime structure for empty hashtables;
21712171
also works around https://github.com/curl/curl/issues/6455 */
21722172
curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDS, "");
2173-
error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDSIZE_LARGE, 0L);
2173+
error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t) 0);
21742174
} else {
21752175
return build_mime_structure_from_hash(ch, zvalue);
21762176
}
21772177
} else {
21782178
zend_string *tmp_str;
21792179
zend_string *str = zval_get_tmp_string(zvalue, &tmp_str);
21802180
/* with curl 7.17.0 and later, we can use COPYPOSTFIELDS, but we have to provide size before */
2181-
error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDSIZE_LARGE, ZSTR_LEN(str));
2181+
error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t) ZSTR_LEN(str));
21822182
error = curl_easy_setopt(ch->cp, CURLOPT_COPYPOSTFIELDS, ZSTR_VAL(str));
21832183
zend_tmp_string_release(tmp_str);
21842184
}

0 commit comments

Comments
 (0)