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

Undefined variable not detected with null coalesce operator #1888

Closed
mpesari opened this issue Feb 11, 2019 · 1 comment
Closed

Undefined variable not detected with null coalesce operator #1888

mpesari opened this issue Feb 11, 2019 · 1 comment

Comments

@mpesari
Copy link

mpesari commented Feb 11, 2019

Summary of a problem or a feature request

When using the null coalesce operator (??) phpstan seems to ignore the fact that the variable is not defined.

Code snippet that reproduces the problem

https://phpstan.org/r/8c114e31-1eb0-426b-ba2e-04a2db27759a

Expected output

Undefined variable: $world

@ondrejmirtes
Copy link
Member

Duplicate of #1823

@ondrejmirtes ondrejmirtes marked this as a duplicate of #1823 Feb 11, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Dec 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants