File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
app/code/Magento/Customer/Model/Address Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -227,11 +227,8 @@ private function getAttributesMeta(Type $entityType): array
227
227
$ attributes = $ entityType ->getAttributeCollection ();
228
228
$ customerId = $ this ->context ->getRequestParam ('parent_id ' );
229
229
$ entityId = $ this ->context ->getRequestParam ('entity_id ' );
230
- $ customerStreetAddressLines = 0 ;
231
230
if (!$ customerId && $ entityId ) {
232
231
$ customerId = $ this ->addressRegistry ->retrieve ($ entityId )->getParentId ();
233
- $ customerStreetAddress = $ this ->addressRegistry ->retrieve ($ entityId )->getStreet ();
234
- $ customerStreetAddressLines = count ($ customerStreetAddress );
235
232
}
236
233
237
234
if ($ customerId ) {
@@ -251,10 +248,11 @@ private function getAttributesMeta(Type $entityType): array
251
248
$ entityType ,
252
249
$ this ->allowToShowHiddenAttributes
253
250
);
254
- if ($ attribute ->getAttributeCode () === 'street ' && $ customerStreetAddressLines !== 0 ) {
251
+ if ($ attribute ->getAttributeCode () === 'street ' && $ entityId ) {
252
+ $ customerAddressStreet = $ this ->addressRegistry ->retrieve ($ entityId )->getStreet ();
255
253
$ meta [$ attribute ->getAttributeCode ()]["arguments " ]["data " ]["config " ]["size " ] = max (
256
254
$ meta [$ attribute ->getAttributeCode ()]["arguments " ]["data " ]["config " ]["size " ],
257
- $ customerStreetAddressLines
255
+ count ( $ customerAddressStreet )
258
256
);
259
257
}
260
258
}
You can’t perform that action at this time.
0 commit comments