Skip to content

Input::json should not convert object to array #443

Closed
@aleemb

Description

@aleemb

When trying to pass around an object, Input::json() returns an array instead. When the request payload contains the following JSON object:

{"name":"John", "age":30}

The expected behavior should be:

$person = Input::json();
$person->name; // doesn't work

Instead each object property must be accessed as an array:

$person = Input::json();
$person['name'];

This used to work fine before the array_get call added somewhere around cd9fcd0.

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