Skip to content

Commit 317d92b

Browse files
author
Tulika,Eugene(etulika)
committed
Merge pull request #310 from magento-api/MAGETWO-37705
MAGETWO-37705: Exception in setup wizard after Magento is installed
2 parents 0e037aa + b4b9720 commit 317d92b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

setup/src/Magento/Setup/Controller/Index.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,16 @@ public function __construct(
3535
public function indexAction()
3636
{
3737
if ($this->objectManager->get('Magento\Framework\App\DeploymentConfig')->isAvailable()) {
38+
/** @var \Magento\Framework\App\State $adminAppState */
39+
$adminAppState = $this->objectManager->get('Magento\Framework\App\State');
40+
$adminAppState->setAreaCode(\Magento\Framework\App\Area::AREA_ADMIN);
41+
3842
$this->objectManager->create(
3943
'Magento\Backend\Model\Auth\Session',
40-
['sessionConfig' => $this->objectManager->get('Magento\Backend\Model\Session\AdminConfig')]
44+
[
45+
'sessionConfig' => $this->objectManager->get('Magento\Backend\Model\Session\AdminConfig'),
46+
'appState' => $adminAppState
47+
]
4148
);
4249
if (!$this->objectManager->get('Magento\Backend\Model\Auth')->isLoggedIn()) {
4350
$view = new ViewModel();

0 commit comments

Comments
 (0)