Skip to content

Fix resolving type of isset($arr['key'])#346

Merged
ondrejmirtes merged 2 commits intophpstan:masterfrom
jlherren:bug-1924
Oct 18, 2020
Merged

Fix resolving type of isset($arr['key'])#346
ondrejmirtes merged 2 commits intophpstan:masterfrom
jlherren:bug-1924

Conversation

@jlherren
Copy link
Copy Markdown
Contributor

It was buggy when $arr['key'] might be null.

Fixes phpstan/phpstan#1924

@ondrejmirtes
Copy link
Copy Markdown
Member

Hi, it'd be nice to also have additional regression test in the rule that produces the "Result of && is always true" message. Otherwise looks good to me 👍

It was buggy when $arr['key'] might be null.

Fixes phpstan/phpstan#1924
@ondrejmirtes
Copy link
Copy Markdown
Member

Rebased and force-pushed (I don't like merge commits), will merge it once the build passes. Thank you! 👍

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.

Asserting isset twice on maybe-nullable offsets of same array results in error

2 participants