Skip to content

Commit

Permalink
Fixes incorrect where condition when deleting swatch option, it delet…
Browse files Browse the repository at this point in the history
…ed all options instead of a specific one.
  • Loading branch information
hostep authored and Amol Chaudhari committed Jan 29, 2019
1 parent 7a3ee17 commit 4ad7bd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/Swatches/Model/ResourceModel/Swatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function clearSwatchOptionByOptionIdAndType($optionIDs, $type = null)
{
if (count($optionIDs)) {
foreach ($optionIDs as $optionId) {
$where = ['option_id' => $optionId];
$where = ['option_id = ?' => $optionId];
if ($type !== null) {
$where['type = ?'] = $type;
}
Expand Down

0 comments on commit 4ad7bd3

Please sign in to comment.