Skip to content

Commit 82f4707

Browse files
ENGCOM-2128: Wishlist update item issue #16372
2 parents efcc26b + 0717e6b commit 82f4707

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/code/Magento/Wishlist/Model/Wishlist.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Wishlist\Model;
78

89
use Magento\Catalog\Api\ProductRepositoryInterface;
@@ -215,9 +216,11 @@ public function loadByCustomerId($customerId, $create = false)
215216
public function getName()
216217
{
217218
$name = $this->_getData('name');
218-
if (!strlen($name)) {
219+
220+
if ($name === null || !strlen($name)) {
219221
return $this->_wishlistData->getDefaultWishlistName();
220222
}
223+
221224
return $name;
222225
}
223226

@@ -637,6 +640,7 @@ public function updateItem($itemId, $buyRequest, $params = null)
637640
$item = null;
638641
if ($itemId instanceof Item) {
639642
$item = $itemId;
643+
$itemId = $item->getId();
640644
} else {
641645
$item = $this->getItem((int)$itemId);
642646
}

0 commit comments

Comments
 (0)