Skip to content

$payload = json_decode($_POST['payload']); would always be empty #1

@n3tfl0w

Description

@n3tfl0w

I had the above issue where $payload would always be null.

Now, I just know just enough php to get myself into trouble but I was able to resolve it like so:

  $data = $_REQUEST["payload"];           
  $unescaped_data = stripslashes($data);
  $payload = json_decode($unescaped_data);

Obviously I could be opening up all kinds of issues but just wanted to make this visible.

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