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
PHPStan mistakenly assumes that an array can pass the is_numeric() test #3133
Comments
I got the same issue, I attempted a solution with phpstan/phpstan-src#177. |
Another test https://phpstan.org/r/29c215da-f552-4d7e-b225-251f923d80bb @ondrejmirtes Could you start me up how to fix |
I also wrote some tips here: phpstan/phpstan-src#177 (comment) |
@ossinkine Now that you are fluent in PHPStan :) Could you help me in fixing |
Fixed: phpstan/phpstan-src@7f04f75 |
The issue is also not reproducible on the code where it was originally discovered and suppressed (doctrine/dbal#3799). Thanks, @ondrejmirtes! |
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
According to the documentation,
is_numeric()
finds whether a variable is a number or a numeric string. Although, PHPStan thinks that a variable that passes the is-numeric test can contain an array.Code snippet that reproduces the problem
https://phpstan.org/r/d65e6a61-95bd-44ac-8093-5afe354bf16c
Expected output
No error
The text was updated successfully, but these errors were encountered: