Skip to content

Commit

Permalink
Merge pull request magepal#70 from ilya-kudravets/master
Browse files Browse the repository at this point in the history
Fix: Invalid argument supplied for foreach()
  • Loading branch information
srenon authored Mar 2, 2021
2 parents 289bfd2 + eecd424 commit 9e4bc92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Block/Data/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected function getProductCategoryName()
protected function getBreadCrumbPath()
{
$titleArray = [];
$breadCrumbs = $this->catalogHelper->getBreadcrumbPath();
$breadCrumbs = $this->catalogHelper->getBreadcrumbPath() ?? [];

foreach ($breadCrumbs as $breadCrumb) {
$titleArray[] = $breadCrumb['label'];
Expand Down

0 comments on commit 9e4bc92

Please sign in to comment.