Skip to content

Wrong condition in ParameterExtension #6844

Closed
@CvekCoding

Description

@CvekCoding

API Platform version(s) affected: 4

Description
In ParamaterExtension there is an edge case when we pass "0" in an argument value, which is ok for boolean filter for example.
see

if (!($v = $parameter->getValue()) || $v instanceof ParameterNotFound) {

This condition !($v = $parameter->getValue()) skips the parameter for further processing.

How to reproduce
Use zero as an argument value.

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