Skip to content

in_array should probably be strict #57

@shampine

Description

@shampine

Both in_array(...$this->excludeWhenEmpty) and in_array(...$this->excludeWhenNull) omit the strict flag.

If you ever had numeric-ish keys, or someone passes integers, PHP can do weird comparisons. Safer:

in_array($snakeCasePropertyName, $this->excludeWhenEmpty, true)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions