Skip to content

Commit

Permalink
Fix error on null variable (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
broopdias authored Feb 10, 2021
1 parent ecfe1f6 commit 9fe3d31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ public function getOptions($currentProduct, $allowedProducts, $stockdata = null)
$options['index'][$productId][$productAttributeId] = $attributeValue;
}
//Adding stock status in the option list.
$options['stock'][$productId][] = $stockdata[$productId]['out_stock'];
if (isset($stockdata)) {
$options['stock'][$productId][] = $stockdata[$productId]['out_stock'];
}
}
return $options;
}
Expand Down

0 comments on commit 9fe3d31

Please sign in to comment.