Unverified Commit 01ad543c authored by NicolasCador's avatar NicolasCador Committed by GitHub
Browse files

Update function getCustomerOrders to avoid error

parent 45fe33fd
......@@ -978,9 +978,9 @@ class OrderCore extends ObjectModel
foreach ($res as $key => $val) {
// In case order creation crashed midway some data might be absent
$orderState = !empty($val['id_order_state']) ? $indexedOrderStates[$val['id_order_state']] : null;
$res[$key]['order_state'] = $orderState['name'] ?: null;
$res[$key]['invoice'] = $orderState['invoice'] ?: null;
$res[$key]['order_state_color'] = $orderState['color'] ?: null;
$res[$key]['order_state'] = $orderState['name'] ?? null;
$res[$key]['invoice'] = $orderState['invoice'] ?? null;
$res[$key]['order_state_color'] = $orderState['color'] ?? null;
}
return $res;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment