Improve product combination check to ensure it's an array before counting
This commit is contained in:
@@ -263,7 +263,7 @@ class ShopProduct
|
|||||||
{
|
{
|
||||||
$product = \shop\Product::getFromCache( $product_id, $lang_id );
|
$product = \shop\Product::getFromCache( $product_id, $lang_id );
|
||||||
|
|
||||||
if ( count( $product -> product_combinations ) )
|
if ( is_array( $product -> product_combinations ) and count( $product -> product_combinations ) )
|
||||||
{
|
{
|
||||||
foreach ( $product -> product_combinations as $product_combination )
|
foreach ( $product -> product_combinations as $product_combination )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user