-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Description
Bug report
The curl_setopt() additions in phpstan/phpstan-src#1719 are very useful, thanks (cc @staabm). Coincidentally just last week I fixed a bug where headers were being sent to curl as a dictionary instead of a list, which is incorrect.
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers) should only allow a numerically indexed array as the third parameter.
Code snippet that reproduces the problem
https://phpstan.org/r/fc00207b-efa7-4d83-adc0-01d874035272
Expected output
Line 8 in the code snippet should produce an error stating that only a list is accepted.
Did PHPStan help you today? Did it make you happy in any way?
I can no longer write PHP without PHPStan.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels