Skip to content

Commit 8f9dd1e

Browse files
author
roman
committed
MAGETWO-61322: Fixed incorrect return-order flow
1 parent b2edfa7 commit 8f9dd1e

File tree

1 file changed

+6
-2
lines changed
  • app/code/Magento/Sales/Controller/AbstractController

1 file changed

+6
-2
lines changed

app/code/Magento/Sales/Controller/AbstractController/Reorder.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,13 @@ public function __construct(
5454
*/
5555
public function execute()
5656
{
57-
if (!$this->getRequest()->isPost() || !$this->formKeyValidator->validate($this->getRequest())) {
57+
if ($this->getRequest()->isPost()) {
58+
if (!$this->formKeyValidator->validate($this->getRequest())) {
59+
$this->messageManager->addErrorMessage(__('Invalid Form Key. Please refresh the page.'));
60+
$this->_redirect('*/*/');
61+
}
62+
} else {
5863
throw new NotFoundException(__('Page not found.'));
59-
return;
6064
}
6165

6266
$result = $this->orderLoader->load($this->_request);

0 commit comments

Comments
 (0)