You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The php doc says (about CURLOPT_POSTFIELDS): 'As of PHP 5.2.0, value must be an array if files are passed to this option with the @ prefix.', but Pest does not respect this. It simply runs $data = (is_array($data)) ? http_build_query($data) : $data; (both in post and put) which obviously makes it impossible to upload files with the request (this way curl sends simply the '@/path' string with the given key, application/x-www-form-urlencoded). The fix should be straightforward: either detect using the '@/path' form and leave the $data as array, or create another method especially for this scenario (i think the former is the better approach).
The text was updated successfully, but these errors were encountered:
The php doc says (about CURLOPT_POSTFIELDS): 'As of PHP 5.2.0, value must be an array if files are passed to this option with the @ prefix.', but Pest does not respect this. It simply runs
$data = (is_array($data)) ? http_build_query($data) : $data;
(both inpost
andput
) which obviously makes it impossible to upload files with the request (this way curl sends simply the '@/path' string with the given key, application/x-www-form-urlencoded). The fix should be straightforward: either detect using the '@/path' form and leave the $data as array, or create another method especially for this scenario (i think the former is the better approach).The text was updated successfully, but these errors were encountered: