Skip to content

Commit

Permalink
Fixed issue with undefined array key "type_id"
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin-Magmodules committed Jul 13, 2023
1 parent 14bbe53 commit 2bffe20
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Service/ProductData/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,12 @@ public function execute(
}
}
if (isset($data[$entityId]['parent_id']) && isset($data[$data[$entityId]['parent_id']])) {
$data[$entityId]['image_logic'] = $extraParameters['behaviour'][
$data[
$data[$entityId]['parent_id']
]['type_id']]['use_parent_images'];
if (!isset($data[$data[$entityId]['parent_id']]['type_id'])) {
$data[$entityId]['image_logic'] = 0;
continue;
}
$typeId = $data[$data[$entityId]['parent_id']]['type_id'];
$data[$entityId]['image_logic'] = $extraParameters['behaviour'][$typeId]['use_parent_images'] ?? 0;
} else {
$data[$entityId]['image_logic'] = 0;
}
Expand Down

0 comments on commit 2bffe20

Please sign in to comment.