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

Report invalid string offsets #11946

Open
staabm opened this issue Oct 31, 2024 · 0 comments · May be fixed by phpstan/phpstan-src#3594
Open

Report invalid string offsets #11946

staabm opened this issue Oct 31, 2024 · 0 comments · May be fixed by phpstan/phpstan-src#3594

Comments

@staabm
Copy link
Contributor

staabm commented Oct 31, 2024

Feature request

offset access on strings requires a 0|positive-int key.
we should error on keys which can keys possibly smaller then 0.

https://phpstan.org/r/f8fc9127-63ee-4cef-b466-d0f7578d108c

should help so I don't fall into the same trap again
https://3v4l.org/1sQTj
sebastianbergmann/comparator#118

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

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants