Skip to content

Commit e24f416

Browse files
author
Prabhu Ram
committed
MC-36897: [GraphQl] Store config and schema modifications for Wishlist
- review fix
1 parent b536fb1 commit e24f416

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ private function addItemToWishlist(Wishlist $wishlist, WishlistItem $wishlistIte
114114
}
115115

116116
try {
117-
if ($wishlistItem->getQuantity() == 0) {
117+
if ((int)$wishlistItem->getQuantity() === 0) {
118118
throw new LocalizedException(__("The quantity of a wish list item cannot be 0"));
119119
}
120120
if ($product->getStatus() == Status::STATUS_DISABLED) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private function updateItemInWishlist(Wishlist $wishlist, WishlistItemData $wish
9696
$wishlistItem = $this->wishlistItemFactory->create();
9797
$this->wishlistItemResource->load($wishlistItem, $wishlistItemData->getId());
9898
$wishlistItem->setDescription($wishlistItemData->getDescription());
99-
if ($wishlistItemData->getQuantity() == 0) {
99+
if ((int)$wishlistItemData->getQuantity() === 0) {
100100
throw new LocalizedException(__("The quantity of a wish list item cannot be 0"));
101101
}
102102
if ($wishlistItem->getProduct()->getStatus() == Status::STATUS_DISABLED) {

0 commit comments

Comments
 (0)