Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CURLOPT_POSTFIELDS accepts also an array #8053

Closed
voku opened this issue Sep 23, 2022 · 3 comments · Fixed by phpstan/phpstan-src#1782
Closed

CURLOPT_POSTFIELDS accepts also an array #8053

voku opened this issue Sep 23, 2022 · 3 comments · Fixed by phpstan/phpstan-src#1782
Labels
Milestone

Comments

@voku
Copy link
Contributor

voku commented Sep 23, 2022

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&para2=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 👍

@ondrejmirtes
Copy link
Member

Hello, thank you for this bugreport. The release notes link the PR that implemented this, please check it out and send a bugfix too.

@ondrejmirtes
Copy link
Member

Fixed by phpstan/phpstan-src#1782

@github-actions
Copy link

github-actions bot commented Nov 3, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants