diff --git a/upload/catalog/controller/api/order.php b/upload/catalog/controller/api/order.php index 31046ab3f..92e1d0d92 100644 --- a/upload/catalog/controller/api/order.php +++ b/upload/catalog/controller/api/order.php @@ -373,7 +373,7 @@ public function add(): void { if (isset($this->request->post['order_status_id'])) { $order_status_id = (int)$this->request->post['order_status_id']; } else { - $order_status_id = $this->config->get('config_order_status_id'); + $order_status_id = (int)$this->config->get('config_order_status_id'); } $this->model_checkout_order->addHistory($json['order_id'], $order_status_id); @@ -732,7 +732,7 @@ public function edit(): void { if (isset($this->request->post['order_status_id'])) { $order_status_id = (int)$this->request->post['order_status_id']; } else { - $order_status_id = $this->config->get('config_order_status_id'); + $order_status_id = (int)$this->config->get('config_order_status_id'); } $this->model_checkout_order->addHistory($order_id, $order_status_id); @@ -864,7 +864,7 @@ public function history(): void { $order_info = $this->model_checkout_order->getOrder($order_id); if ($order_info) { - $this->model_checkout_order->addHistory($order_id, $this->request->post['order_status_id'], $this->request->post['comment'], $this->request->post['notify'], $this->request->post['override']); + $this->model_checkout_order->addHistory($order_id, (int)$this->request->post['order_status_id'], $this->request->post['comment'], $this->request->post['notify'], $this->request->post['override']); $json['success'] = $this->language->get('text_success'); } else {