We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 cannot detect access to uninitialized variables when using the null coalescing operator (??).
??
There should be a difference beetween uninitialized variables and accessing an initialized variable that could contain null.
null
https://phpstan.org/r/fc07a0fb-3326-42ca-8b12-121995e8e780
An Error like: "Undefined variable: $foo" or "An uninitialized array is being accessed".
The text was updated successfully, but these errors were encountered:
Duplicate of #1823
Sorry, something went wrong.
No branches or pull requests
Bug report
PHPStan cannot detect access to uninitialized variables when using the null coalescing operator (
??
).There should be a difference beetween uninitialized variables and accessing an initialized variable that could contain
null
.Code snippet that reproduces the problem
https://phpstan.org/r/fc07a0fb-3326-42ca-8b12-121995e8e780
Expected output
An Error like: "Undefined variable: $foo" or "An uninitialized array is being accessed".
The text was updated successfully, but these errors were encountered: