Skip to content

Commit 5c3f0fe

Browse files
author
vpaladiychuk
committed
Merge branch 'MAGETWO-26762' into MAGETWO-34990
2 parents cbf621b + 8df6478 commit 5c3f0fe

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

app/code/Magento/Backend/App/Action/Context.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class Context extends \Magento\Framework\App\Action\Context
6161
* @param \Magento\Framework\App\ActionFlag $actionFlag
6262
* @param \Magento\Framework\App\ViewInterface $view
6363
* @param \Magento\Framework\Message\ManagerInterface $messageManager
64+
* @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
6465
* @param \Magento\Backend\Model\Session $session
6566
* @param \Magento\Framework\AuthorizationInterface $authorization
6667
* @param \Magento\Backend\Model\Auth $auth
@@ -82,6 +83,7 @@ public function __construct(
8283
\Magento\Framework\App\ActionFlag $actionFlag,
8384
\Magento\Framework\App\ViewInterface $view,
8485
\Magento\Framework\Message\ManagerInterface $messageManager,
86+
\Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory,
8587
\Magento\Backend\Model\Session $session,
8688
\Magento\Framework\AuthorizationInterface $authorization,
8789
\Magento\Backend\Model\Auth $auth,

app/code/Magento/Backend/Model/View/Result/RedirectFactory.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
use Magento\Framework\ObjectManagerInterface;
99

10+
/**
11+
* Factory class for \Magento\Backend\Model\View\Result\Redirect
12+
*/
1013
class RedirectFactory extends \Magento\Framework\Controller\Result\RedirectFactory
1114
{
1215
/**

lib/internal/Magento/Framework/App/Action/AbstractAction.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ abstract class AbstractAction implements \Magento\Framework\App\ActionInterface
1919
*/
2020
protected $_response;
2121

22-
/**
23-
* @var \Magento\Framework\App\Action\Context $context
24-
*/
25-
protected $context;
26-
2722
/**
2823
* @var \Magento\Framework\Controller\Result\RedirectFactory
2924
*/
@@ -41,7 +36,6 @@ public function __construct(
4136
) {
4237
$this->_request = $request;
4338
$this->_response = $response;
44-
$this->context = $context;
4539
$this->resultRedirectFactory = $context->getResultRedirectFactory();
4640
}
4741

@@ -68,7 +62,7 @@ public function getResponse()
6862
/**
6963
* Redirect user to the previous or main page
7064
*
71-
* @return \Magento\Framework\Controller\Result\Redirect|\Magento\Backend\Model\View\Result\Redirect
65+
* @return \Magento\Framework\Controller\Result\Redirect
7266
*/
7367
public function getDefaultRedirect()
7468
{

lib/internal/Magento/Framework/App/ActionInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public function dispatch(RequestInterface $request);
3636
public function getResponse();
3737

3838
/**
39-
* Redirect to custom, previous or main page
39+
* Get default redirect object
4040
*
41-
* @return \Magento\Framework\Controller\ResultInterface
41+
* @return \Magento\Framework\Controller\Result\Redirect
4242
*/
4343
public function getDefaultRedirect();
4444
}

lib/internal/Magento/Framework/App/FrontController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ public function dispatch(RequestInterface $request)
6868
$result = null;
6969
while (!$request->isDispatched() && $routingCycleCounter++ < 100) {
7070
$result = $this->matchAction($request);
71-
7271
}
7372
\Magento\Framework\Profiler::stop('routers_match');
7473
if ($routingCycleCounter > 100) {
@@ -100,6 +99,7 @@ protected function handleException($e, $actionInstance, $message)
10099
*/
101100
protected function matchAction(RequestInterface $request)
102101
{
102+
$result = null;
103103
/** @var \Magento\Framework\App\RouterInterface $router */
104104
foreach ($this->_routerList as $router) {
105105
try {
@@ -115,7 +115,7 @@ protected function matchAction(RequestInterface $request)
115115
$request->setActionName('noroute');
116116
$request->setDispatched(false);
117117
break;
118-
} catch (\Magento\Framework\LocalizedException $e) {
118+
} catch (\Magento\Framework\Exception\LocalizedException $e) {
119119
$result = $this->handleException($e, $actionInstance, $e->getMessage());
120120
break;
121121
} catch (\Exception $e) {

0 commit comments

Comments
 (0)