Skip to content

Commit 92adead

Browse files
committed
B2B-2259: customAttributeMetadata GraphQl query has no cache identity
1 parent fb08ee1 commit 92adead

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

app/code/Magento/EavGraphQl/Model/Resolver/Cache/CustomAttributeMetadataIdentity.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ public function getIdentities(array $resolvedData): array
2323
$identities = [EavAttribute::CACHE_TAG];
2424
if (isset($resolvedData['items']) && !empty($resolvedData['items'])) {
2525
foreach ($resolvedData['items'] as $item) {
26-
$identities[] = sprintf(
27-
"%s_%s",
28-
EavAttribute::CACHE_TAG,
29-
$item['attribute_code']
30-
);
26+
if (is_array($item)) {
27+
$identities[] = sprintf(
28+
"%s_%s",
29+
EavAttribute::CACHE_TAG,
30+
$item['attribute_code']
31+
);
32+
}
3133
}
3234
} else {
3335
return [];

0 commit comments

Comments
 (0)