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

linter: improved undefinedVariable and maybeUndefined checkers #1121

Merged
merged 2 commits into from
Aug 28, 2021

Conversation

i582
Copy link
Contributor

@i582 i582 commented Aug 28, 2021

In the following cases:

$undefinedVar ?? 100
isset($undefinedVar)

no need to throw a warning about an undefined variable,
since these constructs are used to check that the
variable is defined.

Fixes #1007

In the following cases:

$undefinedVar ?? 100
isset($undefinedVar)

no need to throw an warning about an undefined variable,
since these constructs are used to check that the
variable is defined.
@i582 i582 added the enhancement New feature or request label Aug 28, 2021
@i582 i582 added this to the Next milestone Aug 28, 2021
@i582 i582 merged commit a72625c into master Aug 28, 2021
@i582 i582 deleted the pmakhnev/warning_on_undefined_var_in_coalesce_or_isset branch August 28, 2021 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't give a warning that a variable might not be defined in some cases
1 participant