Skip to content

Commit

Permalink
Merge pull request magento#870 from magento-engcom/868
Browse files Browse the repository at this point in the history
MSI-868: Validation for URL key doesn't work and this leads to HTTP ERROR 500
  • Loading branch information
Valeriy Nayda authored Apr 19, 2018
2 parents 745b8f8 + feca0cb commit 4882a24
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ public function __construct(
public function modifyData(array $data)
{
$product = $this->locator->getProduct();
if ($this->isSourceItemsAllowedForProductType->execute($product->getTypeId()) === false) {
return $data;
}

if (!isset($data[$product->getId()]['sources']['assigned_sources'])) {
if ($this->isSourceItemsAllowedForProductType->execute($product->getTypeId()) === false
|| null === $product->getId()
|| !isset($data[$product->getId()]['sources']['assigned_sources'])
) {
return $data;
}

Expand Down

0 comments on commit 4882a24

Please sign in to comment.