Skip to content

Commit 2a76139

Browse files
author
Oleksandr Iegorov
committed
MAGETWO-93047: rest/all/V1/categories/:categoryID deletes category name
1 parent dc3b6a8 commit 2a76139

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

app/code/Magento/Catalog/Plugin/Model/Attribute/Backend/AttributeValidation.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ public function aroundValidate(
4343
\Closure $proceed,
4444
\Magento\Framework\DataObject $entity
4545
) {
46-
$isAllowedType = !empty(array_filter(array_map(function ($allowedEntity) use ($entity) {
47-
return $entity instanceof $allowedEntity;
48-
}, $this->allowedEntityTypes)));
46+
$isAllowedType = !empty(array_filter(
47+
array_map(function ($allowedEntity) use ($entity) {
48+
return $entity instanceof $allowedEntity;
49+
}, $this->allowedEntityTypes)
50+
)
51+
);
4952

5053
if ($isAllowedType && (int) $this->storeManager->getStore()->getId() !== Store::DEFAULT_STORE_ID) {
5154
$attrCode = $subject->getAttribute()->getAttributeCode();

0 commit comments

Comments
 (0)