Skip to content

Commit 06661c3

Browse files
authored
ENGCOM-3920: Fixes incorrect where condition when deleting swatch option, it delet… #20421
2 parents ab1e23e + 1bbc18d commit 06661c3

File tree

1 file changed

+6
-3
lines changed
  • app/code/Magento/Swatches/Model/ResourceModel

1 file changed

+6
-3
lines changed

app/code/Magento/Swatches/Model/ResourceModel/Swatch.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
namespace Magento\Swatches\Model\ResourceModel;
88

99
/**
10-
* @codeCoverageIgnore
1110
* Swatch Resource Model
11+
*
12+
* @codeCoverageIgnore
1213
* @api
1314
* @since 100.0.2
1415
*/
@@ -25,8 +26,10 @@ protected function _construct()
2526
}
2627

2728
/**
28-
* @param string $defaultValue
29+
* Update default swatch option value.
30+
*
2931
* @param integer $id
32+
* @param string $defaultValue
3033
* @return void
3134
*/
3235
public function saveDefaultSwatchOption($id, $defaultValue)
@@ -49,7 +52,7 @@ public function clearSwatchOptionByOptionIdAndType($optionIDs, $type = null)
4952
{
5053
if (count($optionIDs)) {
5154
foreach ($optionIDs as $optionId) {
52-
$where = ['option_id' => $optionId];
55+
$where = ['option_id = ?' => $optionId];
5356
if ($type !== null) {
5457
$where['type = ?'] = $type;
5558
}

0 commit comments

Comments
 (0)