Skip to content

filter_var() should return non-empty-string if argument is non-empty-string #5526

@devbanana

Description

@devbanana

Bug report

Code snippet that reproduces the problem

https://phpstan.org/r/3cbf9f66-1f2f-4a7a-9459-afc5f1da627a

If I've already validated the string is non-empty, then filter_var() is either going to return a non-empty-string, or false.

Expected output

Should not report an error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions