Skip to content

Commit

Permalink
Fix exception if no attribute values are defined on store level
Browse files Browse the repository at this point in the history
  • Loading branch information
Mardl committed Sep 1, 2023
1 parent 37b755d commit ab49371
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Version 22.0.5

## Bugfixes

* Fix exception if no attribute values are defined on store level

# Version 22.0.4

## Feature
Expand Down
2 changes: 1 addition & 1 deletion src/Observers/AttributeOptionValueExportObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function process()
$adminValueArtefacts = $this->getArtefactsByTypeAndEntityId(AttributeOptionExportObserver::ARTEFACT_TYPE, $this->getLastEntityId());

// validate the admin values with the option values
if (!$this->isValidateAdminValuesWithStoreOptionValues($adminValueArtefacts, $attributeOptionValues)) {
if (count($attributeOptionValues) === 0 || !$this->isValidateAdminValuesWithStoreOptionValues($adminValueArtefacts, $attributeOptionValues)) {
// Skip the export if the store values are not valid
return;
}
Expand Down

0 comments on commit ab49371

Please sign in to comment.