Skip to content

fixed non-falsy-string inference with '0'#1658

Merged
ondrejmirtes merged 3 commits intophpstan:1.8.xfrom
staabm:bug7877
Aug 30, 2022
Merged

fixed non-falsy-string inference with '0'#1658
ondrejmirtes merged 3 commits intophpstan:1.8.xfrom
staabm:bug7877

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented Aug 29, 2022

@ondrejmirtes
Copy link
Copy Markdown
Member

Please add a test for phpstan/phpstan#7881 😊

@staabm
Copy link
Copy Markdown
Contributor Author

staabm commented Aug 30, 2022

done. added another fix & test caused by the initial patch

@staabm
Copy link
Copy Markdown
Contributor Author

staabm commented Aug 30, 2022

built error seems unrelated

@ondrejmirtes ondrejmirtes merged commit 5a52370 into phpstan:1.8.x Aug 30, 2022
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you!

@staabm staabm deleted the bug7877 branch August 30, 2022 06:45
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.

while ('0' === $str || strlen($str) !== 0) erroneously reported as "always true" non-falsy-string includes an empty string sometimes

2 participants