Skip to content

Commit 5c3ca9e

Browse files
ACPT-1544
making requested change for websiteId when attribute isn't website-specific
1 parent ff68181 commit 5c3ca9e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/code/Magento/Eav/Model/Config.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Config implements ResetAfterRequestInterface
7373
* Initialized attributes
7474
*
7575
* [int $website][string $entityTypeCode][string $code] = AbstractAttribute $attribute
76-
* @var array<int|null, array<string, array<string, AbstractAttribute>>>
76+
* @var array<int, array<string, array<string, AbstractAttribute>>>
7777
*/
7878
private $attributes;
7979

@@ -255,7 +255,7 @@ private function loadAttributes($entityTypeCode)
255255
if ($this->isAttributeTypeWebsiteSpecific($entityTypeCode)) {
256256
$websiteId = $this->getWebsiteId();
257257
} else {
258-
$websiteId = null;
258+
$websiteId = 0;
259259
}
260260
return $this->attributes[$websiteId][$entityTypeCode] ?? [];
261261
}
@@ -286,7 +286,7 @@ private function saveAttribute(AbstractAttribute $attribute, $entityTypeCode, $a
286286
if ($this->isAttributeTypeWebsiteSpecific($entityTypeCode)) {
287287
$websiteId = $this->getWebsiteId();
288288
} else {
289-
$websiteId = null;
289+
$websiteId = 0;
290290
}
291291
$this->attributes[$websiteId][$entityTypeCode][$attributeCode] = $attribute;
292292
}
@@ -559,7 +559,7 @@ public function getAttribute($entityType, $code)
559559
if ($this->isAttributeTypeWebsiteSpecific($entityType)) {
560560
$websiteId = $this->getWebsiteId();
561561
} else {
562-
$websiteId = null;
562+
$websiteId = 0;
563563
}
564564
if ($code instanceof \Magento\Eav\Model\Entity\Attribute\AttributeInterface) {
565565
return $code;

0 commit comments

Comments
 (0)