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 9
9
class Unsubscribe extends \Magento \Newsletter \Controller \Subscriber
10
10
{
11
11
/**
12
- * Unsubscribe newsletter
13
- * @return void
12
+ * Unsubscribe newsletter.
13
+ *
14
+ * @return \Magento\Backend\Model\View\Result\Redirect
14
15
*/
15
16
public function execute ()
16
17
{
@@ -27,6 +28,9 @@ public function execute()
27
28
$ this ->messageManager ->addException ($ e , __ ('Something went wrong while unsubscribing you. ' ));
28
29
}
29
30
}
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 );
31
35
}
32
36
}
You can’t perform that action at this time.
0 commit comments