File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class ReservedAttributeChecker implements ReservedAttributeCheckerInterface
26
26
* @param array $validators
27
27
*/
28
28
public function __construct (
29
- $ validators = []
29
+ array $ validators = []
30
30
) {
31
31
$ this ->validators = $ validators ;
32
32
}
@@ -37,11 +37,6 @@ public function __construct(
37
37
public function isReservedAttribute (AbstractAttribute $ attribute ): bool
38
38
{
39
39
$ isReserved = false ;
40
- try {
41
- $ attribute ->getEntityType ();
42
- } catch (LocalizedException $ exception ) {
43
- $ isReserved = false ;
44
- }
45
40
$ validators = $ this ->validators [$ attribute ->getEntityType ()->getEntityTypeCode ()] ?? [];
46
41
foreach ($ validators as $ validator ) {
47
42
$ isReserved = $ validator ->isReservedAttribute ($ attribute );
Original file line number Diff line number Diff line change 9
9
<preference for =" Magento\Eav\Model\Entity\Setup\PropertyMapperInterface" type =" Magento\Eav\Model\Entity\Setup\PropertyMapper\Composite" />
10
10
<preference for =" Magento\Eav\Model\Entity\AttributeLoaderInterface" type =" Magento\Eav\Model\Entity\AttributeLoader" />
11
11
<preference for =" Magento\Eav\Model\Entity\Attribute\UniqueValidationInterface" type =" Magento\Eav\Model\Entity\Attribute\UniqueValidator" />
12
+ <preference for =" Magento\Eav\Model\ReservedAttributeCheckerInterface" type =" Magento\Eav\Model\ReservedAttributeChecker" />
12
13
<preference for =" Magento\Eav\Api\Data\AttributeInterface" type =" Magento\Eav\Model\Entity\Attribute" />
13
14
<preference for =" Magento\Eav\Api\AttributeRepositoryInterface" type =" Magento\Eav\Model\AttributeRepository" />
14
15
<preference for =" Magento\Eav\Api\Data\AttributeGroupInterface" type =" Magento\Eav\Model\Entity\Attribute\Group" />
You can’t perform that action at this time.
0 commit comments