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

Internal Error thrown at ConstantArrayTypeBuilder::setOffsetValueType() #7351

Closed
taka-oyama opened this issue May 30, 2022 · 4 comments · Fixed by phpstan/phpstan-src#1366
Closed

Comments

@taka-oyama
Copy link

taka-oyama commented May 30, 2022

Bug report

Upgrading to 1.7.3 and re-running analyze threw an Internal Error at code that was using array_pop in a loop.

The error only happens when there are more than 1 non-literal string item in the popped array.

I'm guessing it was caused by phpstan/phpstan-src#1352.

Code snippet that reproduces the problem

https://phpstan.org/r/8d3f63e7-9e1b-4935-a6be-73bc3908dc7f

Expected output

No Error.

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

I love how it keeps evolving everyday.

Many thanks to all the people working on it.

@ondrejmirtes
Copy link
Member

/cc @herndlm

@herndlm
Copy link
Contributor

herndlm commented May 30, 2022

申し訳ありませんでした 🙇‍♂️ Sorry for causing the problems here, will open a fix PR very soon.
actually the cause here is quite interesting and my changes are only triggering a bug that was already there :)

@taka-oyama
Copy link
Author

Hi, thank you for the quick response! 🚀 Appreciate it!

@github-actions
Copy link

github-actions bot commented Jul 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 Jul 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