File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
app/code/Magento/Catalog/Model/Product/Option/Type Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details .
3
+ * Copyright 2024 Adobe
4
+ * All Rights Reserved .
5
5
*/
6
6
7
7
namespace Magento \Catalog \Model \Product \Option \Type ;
@@ -90,7 +90,11 @@ public function validateUserValue($values)
90
90
}
91
91
} else {
92
92
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
+ }
94
98
$ valuesCollection = $ option ->getOptionValuesByOptionId ($ value , $ this ->getProduct ()->getStoreId ());
95
99
$ valueCount = is_array ($ value ) ? count ($ value ) : 0 ;
96
100
if ($ valuesCollection ->count () != $ valueCount ) {
You can’t perform that action at this time.
0 commit comments