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 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
77namespace 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 ) {
You can’t perform that action at this time.
0 commit comments