File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
app/code/Magento/Sales/Controller/AbstractController Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11
11
use Magento \Framework \Data \Form \FormKey \Validator ;
12
12
use Magento \Framework \Registry ;
13
13
use Magento \Framework \Exception \NotFoundException ;
14
+ use Magento \Framework \Controller \ResultFactory ;
14
15
15
16
abstract class Reorder extends Action \Action
16
17
{
@@ -57,7 +58,11 @@ public function execute()
57
58
if ($ this ->getRequest ()->isPost ()) {
58
59
if (!$ this ->formKeyValidator ->validate ($ this ->getRequest ())) {
59
60
$ 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 ;
61
66
}
62
67
} else {
63
68
throw new NotFoundException (__ ('Page not found. ' ));
You can’t perform that action at this time.
0 commit comments