Skip to content

Fail when offset on array does not exist #3028

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

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Fail when offset on array does not exist #3028

merged 2 commits into from
Apr 23, 2024

Conversation

ttomdewit
Copy link
Contributor

Add initial step to fail when offset on an array does not exist.

All credit to https://github.com/ondrejmirtes

Fixes phpstan/phpstan#7553

@ttomdewit ttomdewit marked this pull request as ready for review April 23, 2024 11:54
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

Verified

This commit was signed with the committer’s verified signature.
rarguelloF Rodrigo Argüello
Let PHPStan fail when possibly non-existing array offset is used.

Fixes phpstan/phpstan#7553

All credits to https://github.com/ondrejmirtes

Add initial step to fail when offset on an array does not exist.

Verified

This commit was signed with the committer’s verified signature.
wconti27 William Conti
@ondrejmirtes ondrejmirtes merged commit 2450222 into phpstan:1.11.x Apr 23, 2024
60 of 61 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@ttomdewit ttomdewit deleted the undefined-array-offsets branch April 23, 2024 12:46
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.

Phpstan ignores possibly undefined array offsets
4 participants