diff --git a/src/Services/QueuedJobService.php b/src/Services/QueuedJobService.php index c230f4cf..bfb5cfaa 100644 --- a/src/Services/QueuedJobService.php +++ b/src/Services/QueuedJobService.php @@ -253,16 +253,9 @@ protected function copyDescriptorToJob($jobDescriptor, $job) $jobData = @unserialize($jobDescriptor->SavedJobData); $messages = @unserialize($jobDescriptor->SavedJobMessages); - if (!$jobData) { - // SS's convert:: function doesn't do this detection for us!! - if (function_exists('json_decode')) { - $jobData = json_decode($jobDescriptor->SavedJobData); - $messages = json_decode($jobDescriptor->SavedJobMessages); - } else { - $jobData = Convert::json2obj($jobDescriptor->SavedJobData); - $messages = Convert::json2obj($jobDescriptor->SavedJobMessages); - } - } + // try decoding as json if null + $jobData = $jobData ?: json_decode($jobDescriptor->SavedJobData); + $messages = $messages ?: json_decode($jobDescriptor->SavedJobMessages); $job->setJobData( $jobDescriptor->TotalSteps,