Return empty array for job order when no ongoing job order. #424

This commit is contained in:
Korina Cordero 2020-07-24 06:42:38 +00:00
parent febd4d6e09
commit d61d71804d

View file

@ -2047,7 +2047,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
if (isset($data['error']))
{
$data['title'] = 'Failed Get Ongoing Job Order';
$data['job_order'] = null;
$data['job_order'] = [];
return $data;
}
@ -2073,9 +2073,9 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
if ($jo == null)
{
$data = [
'title' => 'Failed Get Ongoing Job Order',
'error' => 'No active job order.',
'job_order' => null,
//'title' => 'Failed Get Ongoing Job Order',
//'error' => 'No active job order.',
'job_order' => [],
];
return $data;
}