Skip to content

Commit

Permalink
MAGETWO-32365: [GITHUB] "web setup wizard is not accessible" error me…
Browse files Browse the repository at this point in the history
…ssage but the setup wizard is actually accessible #920

- fixed detecting if Setup application is available when DOCUMENT_ROOT has trailing slash
  • Loading branch information
Anton Makarenko committed Jan 6, 2015
1 parent a437b12 commit 44b7cc1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@ public function isAvailableDataProvider()
],
false
],
'root within doc root, existent sub-directory, trailing slash' => [
[
'DOCUMENT_ROOT' => dirname(__DIR__) . DIRECTORY_SEPARATOR,
'SCRIPT_FILENAME' => __FILE__,
SetupInfo::PARAM_NOT_INSTALLED_URL_PATH => '_files'
],
true
],
];
}
}
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/App/SetupInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function __construct($server, $projectRoot = '')
if (empty($server['DOCUMENT_ROOT'])) {
throw new \InvalidArgumentException('DOCUMENT_ROOT variable is unavailable.');
}
$this->docRoot = str_replace('\\', '/', $server['DOCUMENT_ROOT']);
$this->docRoot = rtrim(str_replace('\\', '/', $server['DOCUMENT_ROOT']), '/');
$this->projectRoot = $projectRoot ?: $this->detectProjectRoot();
$this->projectRoot = str_replace('\\', '/', $this->projectRoot);
}
Expand Down

0 comments on commit 44b7cc1

Please sign in to comment.