From b5efb5cee5cd5a06a4a472d9554e3f4d1f44de63 Mon Sep 17 00:00:00 2001 From: Pieter Hoste Date: Sat, 19 Jan 2019 13:44:43 +0100 Subject: [PATCH] Fixes incorrect where condition when deleting swatch option, it deleted all options instead of a specific one. --- app/code/Magento/Swatches/Model/ResourceModel/Swatch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Swatches/Model/ResourceModel/Swatch.php b/app/code/Magento/Swatches/Model/ResourceModel/Swatch.php index 9dc5b3a0c816f..313ad809beb61 100644 --- a/app/code/Magento/Swatches/Model/ResourceModel/Swatch.php +++ b/app/code/Magento/Swatches/Model/ResourceModel/Swatch.php @@ -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; }