Skip to content

Commit 350d9f1

Browse files
committed
AC-11970: Imposible to reorder configurable products with one checkbox selected custom option
1 parent 8dbebfd commit 350d9f1

File tree

1 file changed

+7
-3
lines changed
  • app/code/Magento/Catalog/Model/Product/Option/Type

1 file changed

+7
-3
lines changed

app/code/Magento/Catalog/Model/Product/Option/Type/Select.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2024 Adobe
4+
* All Rights Reserved.
55
*/
66

77
namespace Magento\Catalog\Model\Product\Option\Type;
@@ -90,7 +90,11 @@ public function validateUserValue($values)
9090
}
9191
} else {
9292
if (!$this->_isSingleSelection()) {
93-
$value = is_string($value) ? explode(',', $value) : [$value];
93+
if (is_string($value)) {
94+
$value = explode(',', $value);
95+
} else if (!is_array($value)) {
96+
$value = [$value];
97+
}
9498
$valuesCollection = $option->getOptionValuesByOptionId($value, $this->getProduct()->getStoreId());
9599
$valueCount = is_array($value) ? count($value) : 0;
96100
if ($valuesCollection->count() != $valueCount) {

0 commit comments

Comments
 (0)