Skip to content

Commit

Permalink
Merge pull request #310 from magento-api/MAGETWO-37705
Browse files Browse the repository at this point in the history
MAGETWO-37705: Exception in setup wizard after Magento is installed
  • Loading branch information
Tulika,Eugene(etulika) committed May 19, 2015
2 parents 0e037aa + b4b9720 commit 317d92b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion setup/src/Magento/Setup/Controller/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,16 @@ public function __construct(
public function indexAction()
{
if ($this->objectManager->get('Magento\Framework\App\DeploymentConfig')->isAvailable()) {
/** @var \Magento\Framework\App\State $adminAppState */
$adminAppState = $this->objectManager->get('Magento\Framework\App\State');
$adminAppState->setAreaCode(\Magento\Framework\App\Area::AREA_ADMIN);

$this->objectManager->create(
'Magento\Backend\Model\Auth\Session',
['sessionConfig' => $this->objectManager->get('Magento\Backend\Model\Session\AdminConfig')]
[
'sessionConfig' => $this->objectManager->get('Magento\Backend\Model\Session\AdminConfig'),
'appState' => $adminAppState
]
);
if (!$this->objectManager->get('Magento\Backend\Model\Auth')->isLoggedIn()) {
$view = new ViewModel();
Expand Down

0 comments on commit 317d92b

Please sign in to comment.