File tree Expand file tree Collapse file tree
app/code/Magento/Customer/Model/Address Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ public function setData($key, $value = null)
263263 {
264264 if (is_array ($ key )) {
265265 $ key = $ this ->_implodeArrayField ($ key );
266- } elseif (is_array ($ value ) && ! empty ( $ value ) && $ this ->isAddressMultilineAttribute ($ key )) {
266+ } elseif (is_array ($ value ) && $ this ->isAddressMultilineAttribute ($ key )) {
267267 $ value = $ this ->_implodeArrayValues ($ value );
268268 }
269269 return parent ::setData ($ key , $ value );
@@ -303,7 +303,11 @@ protected function _implodeArrayField(array $data)
303303 */
304304 protected function _implodeArrayValues ($ value )
305305 {
306- if (is_array ($ value ) && count ($ value )) {
306+ if (is_array ($ value )) {
307+ if (!count ($ value )) {
308+ return '' ;
309+ }
310+
307311 $ isScalar = false ;
308312 foreach ($ value as $ val ) {
309313 if (is_scalar ($ val )) {
You can’t perform that action at this time.
0 commit comments