-
-
Notifications
You must be signed in to change notification settings - Fork 947
CURLOPT_POSTFIELDS accepts also an array #8053
Copy link
Copy link
Closed
phpstan/phpstan-src
#1782Labels
Milestone
Description
Bug report
CURLOPT_POSTFIELDS accepts also an array not only empty-string.
"The full data to post in a HTTP "POST" operation. This parameter can either be passed as a urlencoded string like 'para1=val1¶2=val2&...' or as an array with the field name as key and field data as value. If value is an array, the Content-Type header will be set to multipart/form-data. Files can be sent using CURLFile or CURLStringFile, in which case value must be an array." - https://www.php.net/manual/en/function.curl-setopt.php
Code snippet that reproduces the problem
https://phpstan.org/r/db599e65-dfae-4e85-90bc-6bc96feadf96
Expected output
no error
Did PHPStan help you today? Did it make you happy in any way?
Verified some curl options today 👍
Reactions are currently unavailable