Skip to content

Commit d0b6150

Browse files
committed
Merge remote-tracking branch 'git-35658/fix_implode_multiline_address_with_null_value' into comm_voted_v1
2 parents 76d043a + d38bca2 commit d0b6150

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/code/Magento/Customer/Model/Address/AbstractAddress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ protected function _implodeArrayValues($value)
336336

337337
$isScalar = true;
338338
foreach ($value as $val) {
339-
if (!is_scalar($val)) {
339+
if ($val !== null && !is_scalar($val)) {
340340
$isScalar = false;
341341
break;
342342
}

app/code/Magento/Customer/Test/Unit/Model/Address/AbstractAddressTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ public function getStreetFullDataProvider()
407407
["first line\nsecond line", ['first line', 'second line']],
408408
['single line', ['single line']],
409409
['single line', 'single line'],
410+
['single line', ['single line', null]],
410411
];
411412
}
412413

0 commit comments

Comments
 (0)