File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
app/code/Magento/Newsletter/Controller/Subscriber Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 99class Unsubscribe extends \Magento \Newsletter \Controller \Subscriber
1010{
1111 /**
12- * Unsubscribe newsletter
13- * @return void
12+ * Unsubscribe newsletter.
13+ *
14+ * @return \Magento\Backend\Model\View\Result\Redirect
1415 */
1516 public function execute ()
1617 {
@@ -27,6 +28,9 @@ public function execute()
2728 $ this ->messageManager ->addException ($ e , __ ('Something went wrong while unsubscribing you. ' ));
2829 }
2930 }
30- $ this ->getResponse ()->setRedirect ($ this ->_redirect ->getRedirectUrl ());
31+ /** @var \Magento\Backend\Model\View\Result\Redirect $redirect */
32+ $ redirect = $ this ->resultFactory ->create (\Magento \Framework \Controller \ResultFactory::TYPE_REDIRECT );
33+ $ redirectUrl = $ this ->_redirect ->getRedirectUrl ();
34+ return $ redirect ->setUrl ($ redirectUrl );
3135 }
3236}
You can’t perform that action at this time.
0 commit comments