Skip to content

Commit 21ccf55

Browse files
ENGCOM-5002: Fixed #22396 config:set fails with JSON values #22513
- Merge Pull Request #22513 from opencommerce/magento2:2.3-developPr22396 - Merged commits: 1. 8da509a
2 parents ef04c2c + 8da509a commit 21ccf55

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

app/code/Magento/CatalogInventory/Helper/Minsaleqty.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ protected function serializeValue($value)
9595
}
9696
return $this->serializer->serialize($data);
9797
} else {
98-
return '';
98+
return $value;
9999
}
100100
}
101101

app/code/Magento/CatalogInventory/Test/Unit/Helper/MinsaleqtyTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function testMakeStorableArrayFieldValue($value, $result, $serializeCallC
216216
public function makeStorableArrayFieldValueDataProvider()
217217
{
218218
return [
219-
'invalid bool' => [false, ''],
219+
'invalid bool' => [false, false],
220220
'invalid empty string' => ['', ''],
221221
'valid numeric' => ['22', '22'],
222222
'valid empty array' => [[], '[]', 1],
@@ -240,7 +240,8 @@ public function makeStorableArrayFieldValueDataProvider()
240240
'[1]',
241241
1,
242242
[0 => 1.0]
243-
]
243+
],
244+
'json value' => ['{"32000":2,"0":1}', '{"32000":2,"0":1}'],
244245
];
245246
}
246247
}

0 commit comments

Comments
 (0)