Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Correct SendFriend Visibility Check #760

Merged
merged 1 commit into from
Jul 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ public function execute(int $productId): ProductInterface
$product = $this->productRepository->getById($productId);

if (!in_array(
$product->getVisibility(),
$this->visibility->getVisibleInCatalogIds()
(int) $product->getVisibility(),
$this->visibility->getVisibleInSiteIds(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docblock hint for this function's return value is incorrectly string[] proposed fix here magento/magento2#23532

true
)) {
throw new GraphQlNoSuchEntityException(
__("The product that was requested doesn't exist. Verify the product and try again.")
Expand Down