Skip to content

Commit 732a895

Browse files
committed
Merge remote-tracking branch 'origin/imported-magento-magento2-31093' into 2.4-develop-pr113
2 parents bdf2301 + e3ff240 commit 732a895

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,10 @@ public function validateUserValue($values)
228228
* previous configuration with no newly uploaded file
229229
*/
230230
$fileInfo = null;
231-
if (isset($values[$option->getId()]) && is_array($values[$option->getId()])) {
231+
if (isset($values[$option->getId()])) {
232+
if (is_string($values[$option->getId()])) {
233+
$values[$option->getId()] = explode(',', $values[$option->getId()]);
234+
}
232235
// Legacy style, file info comes in array with option id index
233236
$fileInfo = $values[$option->getId()];
234237
} else {

dev/tests/integration/testsuite/Magento/Checkout/_files/customer_quote_with_items_simple_product_options.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
$iDate++;
6868
break;
6969
case ProductCustomOptionInterface::OPTION_GROUP_FILE:
70-
$value = 'test.jpg';
70+
$value = null;
7171
break;
7272
default:
7373
$value = 'test';

0 commit comments

Comments
 (0)