Skip to content

Sending a PATCH request with ["field"] => bool(false) is being interpreted as "field=" in the request payload. #1004

@gathilas

Description

@gathilas

I am sending a PATCH request with a field that is "["field"] => bool(false)" but on the other end, it's coming through as NULL.

After running $curl->diagnose() I discovered that php-curl-class is converting the PHP value of bool(false) to blank string in the payload: CURLOPT_POSTFIELDS: "field:".

I believe bool(false) should be serialized as either field:false or field:0 to preserve its intended meaning.

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