From ae971be9df7ab3c290dfb1da661e7822c50fa04a Mon Sep 17 00:00:00 2001 From: TheCartpenter Date: Mon, 19 Aug 2024 08:57:45 -0400 Subject: [PATCH] Added array cast on posted product options in API --- upload/catalog/controller/api/cart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload/catalog/controller/api/cart.php b/upload/catalog/controller/api/cart.php index 6c06b9b17..3f45afcff 100644 --- a/upload/catalog/controller/api/cart.php +++ b/upload/catalog/controller/api/cart.php @@ -51,7 +51,7 @@ public function add(): void { } if (isset($this->request->post['option'])) { - $option = array_filter($this->request->post['option']); + $option = array_filter((array)$this->request->post['option']); } else { $option = []; }