Skip to content

Commit

Permalink
ENGCOM-2130: [Forwardport] Fixes updating wishlist item if an item ob…
Browse files Browse the repository at this point in the history
…ject is passed instead its id. #16391
  • Loading branch information
Stanislav Idolov authored Jul 4, 2018
2 parents 342f5cd + 5914661 commit d5892b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/code/Magento/Wishlist/Model/Wishlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit d5892b1

Please sign in to comment.