Skip to content

Commit

Permalink
Added int cast on order_status_id in api/order controller
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed May 12, 2024
1 parent 8fbe209 commit c157cb2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions upload/catalog/controller/api/order.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit c157cb2

Please sign in to comment.