Skip to content

non-falsy-string includes an empty string sometimes #7877

@fluffycondor

Description

@fluffycondor

Bug report

If '0' is removed from string, it becomes non-falsy-string.
string should become non-falsy-string only when '0' and '' were removed.

Code snippet that reproduces the problem

https://phpstan.org/r/344914e6-93a6-4c7a-b39b-15d19f7765a9

Expected output

Just string I guess.

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

💝

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