Skip to content

Commit fd1b492

Browse files
author
Oleksandr Iegorov
committed
MAGETWO-84000: Undefined index: region_id is presented after save customer address
1 parent d9ebeee commit fd1b492

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

app/code/Magento/Customer/Block/Address/Edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ protected function _prepareLayout()
139139

140140
if ($postedData = $this->_customerSession->getAddressFormData(true)) {
141141
$postedData['region'] = [
142-
'region_id' => $postedData['region_id'],
143-
'region' => $postedData['region'],
142+
'region_id' => $postedData['region_id'] ?? null,
143+
'region' => $postedData['region'] ?? null,
144144
];
145145
$this->dataObjectHelper->populateWithArray(
146146
$this->_address,

app/code/Magento/Customer/Model/AttributeChecker.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Magento\Customer\Api\AddressMetadataInterface;
99
use Magento\Customer\Api\AddressMetadataManagementInterface;
1010
use Magento\Customer\Model\Metadata\AttributeResolver;
11-
use Magento\Framework\App\Helper\Context;
1211

1312
/**
1413
* Customer attribute checker.

0 commit comments

Comments
 (0)