Skip to content

Commit fb853bd

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

File tree

1 file changed

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

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Magento\Framework\Data\Form\FormKey\Validator;
1212
use Magento\Framework\Registry;
1313
use Magento\Framework\Exception\NotFoundException;
14+
use Magento\Framework\Controller\ResultFactory;
1415

1516
abstract class Reorder extends Action\Action
1617
{
@@ -57,7 +58,11 @@ public function execute()
5758
if ($this->getRequest()->isPost()) {
5859
if (!$this->formKeyValidator->validate($this->getRequest())) {
5960
$this->messageManager->addErrorMessage(__('Invalid Form Key. Please refresh the page.'));
60-
$this->_redirect('*/*/');
61+
62+
/** @var \Magento\Framework\Controller\Result\Redirect $redirect */
63+
$redirect=$this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
64+
$redirect->setRefererUrl();
65+
return $redirect;
6166
}
6267
} else {
6368
throw new NotFoundException(__('Page not found.'));

0 commit comments

Comments
 (0)