Skip to content

Commit c54495d

Browse files
author
Oleksandr Karpenko
committed
MAGETWO-43952: Ability to overwrite customer addressed from front-end
1 parent 0085273 commit c54495d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/code/Magento/Customer/Controller/Address/FormPost.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,10 @@ public function execute()
206206
$this->messageManager->addException($e, __('We can\'t save the address.'));
207207
}
208208

209+
$url = $redirectUrl;
209210
if (!$redirectUrl) {
210211
$this->_getSession()->setAddressFormData($this->getRequest()->getPostValue());
211212
$url = $this->_buildUrl('*/*/edit', ['id' => $this->getRequest()->getParam('id')]);
212-
} else {
213-
$url = $redirectUrl;
214213
}
215214

216215
return $this->resultRedirectFactory->create()->setUrl($this->_redirect->error($url));

0 commit comments

Comments
 (0)