vimeo / psalm

A static analysis tool for finding errors in PHP applications
https://psalm.dev
MIT License
5.54k stars 659 forks source link

`isset()` assertion doesn't make a multi-nested array key defined for Psalm #9176

Open fluffycondor opened 1 year ago

fluffycondor commented 1 year ago

https://psalm.dev/r/3bdaf6cf9a

Expected: no errors. Got: MixedArrayAccess.

psalm-github-bot[bot] commented 1 year ago

I found these snippets:

https://psalm.dev/r/3bdaf6cf9a ```php
fluffycondor commented 1 year ago

Worth noting that isset() assertion actually doesn't work, maybe that's the main reason: https://psalm.dev/r/a1501bef49

Attempt to trace undefined variable $data['level1']['level2']['level3']['level4']

psalm-github-bot[bot] commented 1 year ago

I found these snippets:

https://psalm.dev/r/a1501bef49 ```php