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

Replace empty() and some isset() calls #100

Merged
merged 16 commits into from
May 23, 2024
Merged

Replace empty() and some isset() calls #100

merged 16 commits into from
May 23, 2024

Conversation

sirbrillig
Copy link
Owner

@sirbrillig sirbrillig commented May 23, 2024

Since empty() and isset() work on undefined variables without a warning, they also hide bugs from static analysis (causing the bug in #99). Here we replace most uses of these functions with more precise alternatives that will produce warnings and errors if the variables they check have a typo.

This PR also fixes a bunch of new static analysis errors that relate to implicit boolean guards not being explicit enough.

@sirbrillig sirbrillig merged commit 7be9f99 into trunk May 23, 2024
26 checks passed
@sirbrillig sirbrillig deleted the remove-empty branch May 23, 2024 19:55
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.

1 participant