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
curl_setopt with CURLOPT_POSTFIELDS → Parameter #3 $value of function curl_setopt expects non-empty-string, string given. #8065
Comments
http_build_query should be modified to return non-empty-string. |
We are getting this issue as well. we had to disable phpstan until it's fixed because I could not find a work around.
|
@dwenaus please open a separate issue with your code, so we can see which of these errors are legit and which ones are bugs |
I cannot ignore them via the baseline. They only show up in GitHub actions and not locally. And they came out of the blue. I reran a green branch from a few days ago, zero code changes, and now it fails with the above errors. All branches now fail just like this. But I will ignore them line by line. both local and github action are running phpstan 1.8.4. |
Curl types are a opt-in feature atm. These errors only happen when bleedingEdge is enabled. So you can disable the deature if you need. We would love to see your code example to get an idea whether the new curl types work as expected |
Here is how we're using a few of them along with the errors.
From another page:
There were a number of |
But there is another bug somewhere because these errors show up on github actions but not locally, all using the same config and same version of phpstan. Thanks for the tip about bleeding edge. Maybe we'll turn that off to get more stability. |
Hold on...
|
The php documentation states the following.
|
Feel free to fix the typehints :) Here's the original PR phpstan/phpstan-src#1719. You might find this documentation helpful: https://phpstan.org/developing-extensions/type-system |
I'll try to fix this phpstan/phpstan-src#1777 |
Fixed by phpstan/phpstan-src#1782 |
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. |
Bug report
Since the PR 1719 providing an key-value array to
http_build_query
and using the return value as 3. parameter to curl_setopt withCURLOPT_POSTFIELDS
lead to this issue.Code snippet that reproduces the problem
https://phpstan.org/r/6d05e5cb-00cf-482d-9021-0c077e2c63bb
Expected output
none error
Did PHPStan help you today? Did it make you happy in any way?
always happy with a new release as many (invisible) issue get's discovered - thank you :D!
The text was updated successfully, but these errors were encountered: