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

Regression in handling of list contents #4558

Closed
Seldaek opened this issue Feb 18, 2021 · 3 comments
Closed

Regression in handling of list contents #4558

Seldaek opened this issue Feb 18, 2021 · 3 comments

Comments

@Seldaek
Copy link
Contributor

Seldaek commented Feb 18, 2021

Bug report

See this repro case:

https://phpstan.org/r/61ab77ae-262b-4d1f-b19c-e72392ba45f6

Expected output

No error as $this->suggestions can be empty at line 20 due to the array_shift($this->suggestions) at line 13. The fact that it entered the while() does not prove it still has data in the array by the end of it.

Note that with 0.12.54 it does not error. I am not sure which version since then added the regression but at least at that one it worked.

@ondrejmirtes
Copy link
Member

Fixed, thank you! phpstan/phpstan-src@6b2afbc

@Seldaek
Copy link
Contributor Author

Seldaek commented Feb 18, 2021

Awesome thanks :)

@github-actions
Copy link

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 Apr 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants