Skip to content

Commit a395799

Browse files
author
vpaladiychuk
committed
Merge branch 'MAGETWO-34988' into MAGETWO-26762
2 parents 9bb194f + 63523e5 commit a395799

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,9 @@ public function dispatch(RequestInterface $request)
8080
* Handle exception
8181
*
8282
* @param \Exception $e
83-
* @param \Magento\Framework\App\ActionInterface $actionInstance
84-
* @return \Magento\Framework\Controller\Result\Redirect
83+
* @return void
8584
*/
86-
protected function handleException($e, $actionInstance)
85+
protected function handleException($e)
8786
{
8887
$needToMaskDisplayMessage = !($e instanceof \Magento\Framework\Exception\LocalizedException)
8988
&& ($this->appState->getMode() != State::MODE_DEVELOPER);
@@ -92,7 +91,6 @@ protected function handleException($e, $actionInstance)
9291
: $e->getMessage();
9392
$this->messageManager->addError($displayMessage);
9493
$this->logger->critical($e->getMessage());
95-
return $actionInstance->getDefaultRedirect();
9694
}
9795

9896
/**
@@ -116,7 +114,8 @@ protected function processRequest(RequestInterface $request)
116114
} catch (Action\NotFoundException $e) {
117115
throw $e;
118116
} catch (\Exception $e) {
119-
$result = $this->handleException($e, $actionInstance);
117+
$this->handleException($e);
118+
$result = $actionInstance->getDefaultRedirect();
120119
}
121120
break;
122121
}

lib/internal/Magento/Framework/App/Test/Unit/FrontControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Magento\Framework\App\Test\Unit;
77

88
use Magento\Framework\App\Action\NotFoundException;
9-
use \Magento\Framework\App\State;
9+
use Magento\Framework\App\State;
1010

1111
class FrontControllerTest extends \PHPUnit_Framework_TestCase
1212
{

0 commit comments

Comments
 (0)