From 7206dec1817a2c163762188682b30f3055a139c2 Mon Sep 17 00:00:00 2001 From: Arndt von Lucadou Date: Tue, 28 Feb 2023 12:55:03 +0100 Subject: [PATCH] Fix php8 array access --- .../Isotope/Model/Attribute/AbstractAttributeWithOptions.php | 2 +- .../modules/isotope/library/Isotope/Model/Product/Standard.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/modules/isotope/library/Isotope/Model/Attribute/AbstractAttributeWithOptions.php b/system/modules/isotope/library/Isotope/Model/Attribute/AbstractAttributeWithOptions.php index 7299b3302a..616207c7d6 100644 --- a/system/modules/isotope/library/Isotope/Model/Attribute/AbstractAttributeWithOptions.php +++ b/system/modules/isotope/library/Isotope/Model/Attribute/AbstractAttributeWithOptions.php @@ -95,7 +95,7 @@ public function getOptionsForWidget(IsotopeProduct $objProduct = null) foreach ($options as $option) { $option['label'] = Translation::get($option['label']); - if ($option['group']) { + if ($option['group'] ?? false) { $group = $option['label']; continue; } diff --git a/system/modules/isotope/library/Isotope/Model/Product/Standard.php b/system/modules/isotope/library/Isotope/Model/Product/Standard.php index 36fe5a0086..a909708faf 100644 --- a/system/modules/isotope/library/Isotope/Model/Product/Standard.php +++ b/system/modules/isotope/library/Isotope/Model/Product/Standard.php @@ -708,7 +708,7 @@ protected function generateProductOptionWidget($strField, &$arrVariantOptions, & } else { $blankOption = $k; } - } elseif (!\in_array($option['value'], $arrOptions) && !$option['group']) { + } elseif (!\in_array($option['value'], $arrOptions) && !($option['group'] ?? false)) { unset($arrField['options'][$k]); } }