Skip to content

nullCoalesce.offset and isset.offset report an error on an array offset that can be null #11708

@systemasis

Description

@systemasis

Bug report

With an array built dynamically, PHPStan reports, for any given offset, that it always exists while it might not.

Code snippet that reproduces the problem

https://phpstan.org/r/bf04b4ce-f05e-44b8-892f-136ec7d7c07a

Expected output

No error should be thrown.

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions