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

Don't report "is always true/false" for conditionally defined variables #3598

Open
wants to merge 1 commit into
base: 2.0.x
Choose a base branch
from

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Nov 2, 2024

@staabm staabm marked this pull request as ready for review November 2, 2024 13:51
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes
Copy link
Member

The bug here is that PHPStan complains about "maybe undefined variable". Which it does only in foreach: https://phpstan.org/r/f934106d-8765-4463-8344-40b1c64ffc37

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.

Variable inside loop might not be defined.
3 participants