Add array check for product combinations in ShopProduct class

This commit is contained in:
2024-10-31 11:52:54 +01:00
parent b18806c475
commit 9e3b109c39

View File

@@ -263,7 +263,7 @@ class ShopProduct
{
$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 )
{