mirror of
https://github.com/php/php-src.git
synced 2025-01-27 06:03:45 +08:00
fix bug #17963
This commit is contained in:
parent
b3e562f9ef
commit
51e5a578b7
@ -786,11 +786,17 @@ PHP_FUNCTION(curl_setopt)
|
||||
|
||||
postval = Z_STRVAL_PP(current);
|
||||
if (*postval == '@') {
|
||||
error = curl_formadd(&first, &last, CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_FILE, ++postval, CURLFORM_END);
|
||||
error = curl_formadd(&first,
|
||||
&last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, string_key_len,
|
||||
CURLFORM_FILE, ++postval,
|
||||
CURLFORM_END);
|
||||
}
|
||||
else {
|
||||
error = curl_formadd(&first, &last, CURLFORM_COPYNAME, string_key,
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, string_key_len,
|
||||
CURLFORM_PTRCONTENTS, postval,
|
||||
CURLFORM_CONTENTSLENGTH, Z_STRLEN_PP(current),
|
||||
CURLFORM_END);
|
||||
|
Loading…
Reference in New Issue
Block a user