Skip to content

Commit

Permalink
Return nothing if product not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidpeywasti committed Apr 10, 2017
1 parent 4734070 commit 0fe0376
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/Respinar/Products/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ public function productURLInsertTags($strTag)
if (isset($arrSplit[1]))
{
// Get the items
$objProduct = \ProductModel::findPublishedByIdOrAlias($arrSplit[1]);
if (($objProduct = \ProductModel::findPublishedByIdOrAlias($arrSplit[1])) === null)
{
return false;
}

$objCatalog = \ProductCatalogModel::findBy('id',$objProduct->pid);

Expand Down

0 comments on commit 0fe0376

Please sign in to comment.