dingo / dingo/api

JSON Response force casting empty object to empty array

Open
#1,170 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
PHP
Stars
9.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Ran into this issue while using the project at work, dropping this as a note to look into.

Manually crafting a JSON response with intentionally empty object, results in dingo recreating the response and forcing the empty object to an empty array due to [this line](https://github.com/dingo/api/blob/master/src/Http/Response.php#L98)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.