Skip to content

Commit 460b904

Browse files
committed
MAGETWO-48601: Stabilize category save controller integration test
1 parent 67d54bc commit 460b904

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/Eav/Model/ResourceModel/UpdateHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function execute($entityType, $data)
133133
}
134134
if ((!array_key_exists($attribute->getAttributeCode(), $snapshot)
135135
|| $snapshot[$attribute->getAttributeCode()] === false)
136-
&& array_key_exists($attribute->getAttributeCode(), $data)
136+
&& !empty($data[$attribute->getAttributeCode()])
137137
&& !$attribute->isValueEmpty($data[$attribute->getAttributeCode()])
138138
) {
139139
$this->attributePersistor->registerInsert(
@@ -146,7 +146,7 @@ public function execute($entityType, $data)
146146
}
147147
if (array_key_exists($attribute->getAttributeCode(), $snapshot)
148148
&& $snapshot[$attribute->getAttributeCode()] !== false
149-
&& array_key_exists($attribute->getAttributeCode(), $data)
149+
&& !empty($data[$attribute->getAttributeCode()])
150150
&& $snapshot[$attribute->getAttributeCode()] != $data[$attribute->getAttributeCode()]
151151
&& !$attribute->isValueEmpty($data[$attribute->getAttributeCode()])
152152
) {

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function saveActionDataProvider()
152152
'id' => '2',
153153
'path' => '1/2',
154154
'url_key' => 'default-category',
155-
'is_anchor' => '0',
155+
'is_anchor' => 'false',
156156
'use_default' => [
157157
'name' => 1,
158158
'is_active' => 1,

0 commit comments

Comments
 (0)