Skip to content

Commit

Permalink
fix: move string check/decode for data in payload
Browse files Browse the repository at this point in the history
  • Loading branch information
jryd committed Apr 1, 2024
1 parent 7de9e7e commit b4bb38a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Recorders/JobRecorder/JobRecorder.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ protected function getJobProperties(): array
foreach ($payload as $key => $value) {
if (! in_array($key, ['job', 'data', 'displayName'])) {
$properties[$key] = $value;
}
}

if (is_string($payload['data'])) {
try {
$properties['data'] = json_decode($payload['data'], true, 512, JSON_THROW_ON_ERROR);
} catch (Exception $exception) {
}
}
if (is_string($payload['data'])) {
try {
$properties['data'] = json_decode($payload['data'], true, 512, JSON_THROW_ON_ERROR);
} catch (Exception $exception) {
}
}

Expand Down

0 comments on commit b4bb38a

Please sign in to comment.