Skip to content

Commit 25428fd

Browse files
MDVA-160: Performance.
1 parent 84dedf7 commit 25428fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ public function setData($key, $value = null)
276276
*/
277277
protected function isAddressMultilineAttribute($code)
278278
{
279+
if ($code === 'attributes') {
280+
return false;
281+
}
279282
return $code == 'street' || in_array($code, $this->getCustomAttributesCodes());
280283
}
281284

@@ -288,7 +291,7 @@ protected function isAddressMultilineAttribute($code)
288291
protected function _implodeArrayField(array $data)
289292
{
290293
foreach ($data as $key => $value) {
291-
if (is_array($value) && $this->isAddressMultilineAttribute($key)) {
294+
if (is_array($value) && !empty($value) && $this->isAddressMultilineAttribute($key)) {
292295
$data[$key] = $this->_implodeArrayValues($data[$key]);
293296
}
294297
}

0 commit comments

Comments
 (0)