Skip to content

Conversation

@sirbrillig
Copy link
Owner

PHP allows undefined variables to be used inside isset() and empty(). This change prevents such usages from generating warnings.

Note that this only affects the usage of variables inside the call sites of those functions, it does not mean that a variable who's existence is confirmed with isset() will not be marked as undefined in later reads. That's definitely not ideal, but detecting those use-cases is very difficult, as described in this comment.

Fixes #202

@sirbrillig sirbrillig added this to the 3.0 milestone Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

isset() check flagged as undefined variable

2 participants