From beb41d03ca35b6a423f546f31149df57124475bb Mon Sep 17 00:00:00 2001 From: "vadim.malesh" Date: Wed, 3 Jun 2020 14:27:28 +0300 Subject: [PATCH] fix webapi --- app/code/Magento/Sales/Model/Order/ItemRepository.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Model/Order/ItemRepository.php b/app/code/Magento/Sales/Model/Order/ItemRepository.php index 5e36cc3683d6e..dcb669055964b 100644 --- a/app/code/Magento/Sales/Model/Order/ItemRepository.php +++ b/app/code/Magento/Sales/Model/Order/ItemRepository.php @@ -185,7 +185,9 @@ private function getItemProductOptions(OrderItemInterface $entity): array { $request = $this->getBuyRequest($entity); $productOptions = $entity->getProductOptions(); - $productOptions['info_buyRequest'] = array_merge($productOptions['info_buyRequest'], $request->toArray()); + $productOptions['info_buyRequest'] = $productOptions + ? array_merge($productOptions['info_buyRequest'], $request->toArray()) + : $request->toArray(); return $productOptions; }