Skip to content

Commit 35e49f1

Browse files
committed
ACP2E-2689: No Appropriate error message when website id is wrong in the request
- Fixed the validation issue.
1 parent 11ec82d commit 35e49f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Catalog/Model/Product/Price/Validation/TierPriceValidator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,11 @@ private function checkWebsite(TierPriceInterface $price, $key, Result $validatio
373373
{
374374
try {
375375
$this->websiteRepository->getById($price->getWebsiteId());
376-
$isGlobalConfig = (int) $this->scopeConfig->getValue(
376+
$isGlobalConfig = $this->scopeConfig->getValue(
377377
Data::XML_PATH_PRICE_SCOPE,
378378
ScopeInterface::SCOPE_STORE
379379
);
380+
$isGlobalConfig = isset($isGlobalConfig) ? (int) $isGlobalConfig : null;
380381
if ($isGlobalConfig === Data::PRICE_SCOPE_GLOBAL &&
381382
(int) $this->allWebsitesValue !== $price->getWebsiteId()
382383
) {

0 commit comments

Comments
 (0)