Skip to content

Commit b4bb38a

Browse files
committed
fix: move string check/decode for data in payload
1 parent 7de9e7e commit b4bb38a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Recorders/JobRecorder/JobRecorder.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ protected function getJobProperties(): array
7272
foreach ($payload as $key => $value) {
7373
if (! in_array($key, ['job', 'data', 'displayName'])) {
7474
$properties[$key] = $value;
75+
}
76+
}
7577

76-
if (is_string($payload['data'])) {
77-
try {
78-
$properties['data'] = json_decode($payload['data'], true, 512, JSON_THROW_ON_ERROR);
79-
} catch (Exception $exception) {
80-
}
81-
}
78+
if (is_string($payload['data'])) {
79+
try {
80+
$properties['data'] = json_decode($payload['data'], true, 512, JSON_THROW_ON_ERROR);
81+
} catch (Exception $exception) {
8282
}
8383
}
8484

0 commit comments

Comments
 (0)