Skip to content

Commit

Permalink
Fix php8 array access
Browse files Browse the repository at this point in the history
  • Loading branch information
a-v-l committed Feb 28, 2023
1 parent 3a33288 commit 7206dec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
}
Expand Down

0 comments on commit 7206dec

Please sign in to comment.