Revert to regular json_encode because auto int conversion sucks
This commit is contained in:
parent
e638e63e81
commit
b3eb68346f
2 changed files with 4 additions and 3 deletions
|
|
@ -1587,8 +1587,8 @@ class APIController extends Controller
|
|||
$items[] = [
|
||||
'id' => $item->getID(),
|
||||
'title' => $item->getTitle(),
|
||||
'qty' => $item->getQuantity(),
|
||||
'price' => $item->getPrice(),
|
||||
'qty' => (int) $item->getQuantity(),
|
||||
'price' => (float) $item->getPrice(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,8 @@ class APIResult
|
|||
'data' => $this->data
|
||||
];
|
||||
|
||||
$json_data = json_encode($return_data, JSON_NUMERIC_CHECK);
|
||||
// $json_data = json_encode($return_data, JSON_NUMERIC_CHECK);
|
||||
$json_data = json_encode($return_data);
|
||||
$json = new Response($json_data);
|
||||
|
||||
return $json;
|
||||
|
|
|
|||
Loading…
Reference in a new issue