Skip to content

Commit

Permalink
r Properly re-encode json
Browse files Browse the repository at this point in the history
  • Loading branch information
dusterio committed Nov 3, 2016
1 parent 72a79db commit a81d562
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Sqs/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ private function modifyPayload($payload, $class)
{
if (! is_array($payload)) $payload = json_decode($payload, true);

$body = json_decode($payload['Body'], true);

$body = [
'job' => $class . '@handle',
'data' => json_decode($payload['Body'])
'data' => isset($body['data']) ? $body['data'] : $body
];

$payload['Body'] = json_encode($body);
Expand Down

0 comments on commit a81d562

Please sign in to comment.