From 9e3b109c397580964403b53691fd15dbeb23ea27 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Thu, 31 Oct 2024 11:52:54 +0100 Subject: [PATCH] Add array check for product combinations in ShopProduct class --- autoload/admin/factory/class.ShopProduct.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/admin/factory/class.ShopProduct.php b/autoload/admin/factory/class.ShopProduct.php index 7437b8d..c372c3f 100644 --- a/autoload/admin/factory/class.ShopProduct.php +++ b/autoload/admin/factory/class.ShopProduct.php @@ -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 ) {