diff --git a/app/code/Magento/Wishlist/Model/Wishlist.php b/app/code/Magento/Wishlist/Model/Wishlist.php index 9eb4e1f5ebcd2..d6284f32c4f5e 100644 --- a/app/code/Magento/Wishlist/Model/Wishlist.php +++ b/app/code/Magento/Wishlist/Model/Wishlist.php @@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Wishlist\Model; use Magento\Catalog\Api\ProductRepositoryInterface; @@ -637,6 +639,7 @@ public function updateItem($itemId, $buyRequest, $params = null) $item = null; if ($itemId instanceof Item) { $item = $itemId; + $itemId = $item->getId(); } else { $item = $this->getItem((int)$itemId); }