Skip to content

Commit

Permalink
Merge pull request #2 from fransyrcc/develop
Browse files Browse the repository at this point in the history
Cleaning code: white spaces
  • Loading branch information
fransyrcc authored Nov 26, 2017
2 parents df2ad33 + e818fad commit adf94fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Plugin/DisabledProductsRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function aroundExecute(ProductController $subject, callable $proceed)
if ($product->isDisabled()) {
$cats = $product->getCategoryIds();
if ($cats) {
try{
try {
$firstCategoryId = $cats[0];
$category = $this->categoryInterface->get($firstCategoryId);
if ($category->getIsActive()) {
Expand All @@ -94,12 +94,12 @@ public function aroundExecute(ProductController $subject, callable $proceed)
} else {
// TODO consider cases where category can't be displayed, maybe check other categories
throw new \Magento\Framework\Exception\LocalizedException(__('First category is not active'));
}
} catch (\Exception $e) {
}
} catch (\Exception $e) {
return $proceed();
}
}
}
}
return $proceed();
}
private function getMessage()
Expand Down

0 comments on commit adf94fe

Please sign in to comment.