Skip to content

Regression in handling of list contents #4558

@Seldaek

Description

@Seldaek

Bug report

See this repro case:

https://phpstan.org/r/61ab77ae-262b-4d1f-b19c-e72392ba45f6

Expected output

No error as $this->suggestions can be empty at line 20 due to the array_shift($this->suggestions) at line 13. The fact that it entered the while() does not prove it still has data in the array by the end of it.

Note that with 0.12.54 it does not error. I am not sure which version since then added the regression but at least at that one it worked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions