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

non-falsy-string includes an empty string sometimes #7877

Closed
fluffycondor opened this issue Aug 29, 2022 · 3 comments · Fixed by phpstan/phpstan-src#1658
Closed

non-falsy-string includes an empty string sometimes #7877

fluffycondor opened this issue Aug 29, 2022 · 3 comments · Fixed by phpstan/phpstan-src#1658

Comments

@fluffycondor
Copy link
Contributor

Bug report

If '0' is removed from string, it becomes non-falsy-string.
string should become non-falsy-string only when '0' and '' were removed.

Code snippet that reproduces the problem

https://phpstan.org/r/344914e6-93a6-4c7a-b39b-15d19f7765a9

Expected output

Just string I guess.

Did PHPStan help you today? Did it make you happy in any way?

💝

@ondrejmirtes
Copy link
Member

/cc @staabm

@staabm
Copy link
Contributor

staabm commented Aug 29, 2022

thanks for the report. the issue will be fixed with phpstan/phpstan-src#1658

@github-actions
Copy link

github-actions bot commented Oct 1, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants