Skip to content

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

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

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

Conversation

@staabm

@staabm staabm commented Aug 29, 2022

Copy link
Copy Markdown
Contributor

@ondrejmirtes

Copy link
Copy Markdown
Member

Please add a test for phpstan/phpstan#7881 😊

@staabm

staabm commented Aug 30, 2022

Copy link
Copy Markdown
Contributor Author

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

@staabm

staabm commented Aug 30, 2022

Copy link
Copy Markdown
Contributor Author

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