Skip to content

Commit

Permalink
ENGCOM-2128: Wishlist update item issue #16372
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirZaets authored Jul 2, 2018
2 parents efcc26b + 0717e6b commit 82f4707
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/code/Magento/Wishlist/Model/Wishlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Wishlist\Model;

use Magento\Catalog\Api\ProductRepositoryInterface;
Expand Down Expand Up @@ -215,9 +216,11 @@ public function loadByCustomerId($customerId, $create = false)
public function getName()
{
$name = $this->_getData('name');
if (!strlen($name)) {

if ($name === null || !strlen($name)) {
return $this->_wishlistData->getDefaultWishlistName();
}

return $name;
}

Expand Down Expand Up @@ -637,6 +640,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 82f4707

Please sign in to comment.