File tree 1 file changed +6
-2
lines changed
app/code/Magento/Customer/Model/Address
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ public function setData($key, $value = null)
263
263
{
264
264
if (is_array ($ key )) {
265
265
$ key = $ this ->_implodeArrayField ($ key );
266
- } elseif (is_array ($ value ) && ! empty ( $ value ) && $ this ->isAddressMultilineAttribute ($ key )) {
266
+ } elseif (is_array ($ value ) && $ this ->isAddressMultilineAttribute ($ key )) {
267
267
$ value = $ this ->_implodeArrayValues ($ value );
268
268
}
269
269
return parent ::setData ($ key , $ value );
@@ -303,7 +303,11 @@ protected function _implodeArrayField(array $data)
303
303
*/
304
304
protected function _implodeArrayValues ($ value )
305
305
{
306
- if (is_array ($ value ) && count ($ value )) {
306
+ if (is_array ($ value )) {
307
+ if (!count ($ value )) {
308
+ return '' ;
309
+ }
310
+
307
311
$ isScalar = false ;
308
312
foreach ($ value as $ val ) {
309
313
if (is_scalar ($ val )) {
You can’t perform that action at this time.
0 commit comments