Skip to content

Optional array key is not recognized with !empty #3297

@mrpavlikov

Description

@mrpavlikov

Bug report

Optional array key is not recongized when using !empty, only works with isset.

Code snippet that reproduces the problem

https://phpstan.org/r/896f13be-9ac0-43bd-9940-d53fbdb6e4be

Expected output

Expected no error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions