Skip to content
Snippets Groups Projects
Commit 754939bc authored by Bohdan Korablov's avatar Bohdan Korablov
Browse files

MAGETWO-56317: [GitHub] -[2.1.0] underscore in site url breaks admin redirect...

MAGETWO-56317: [GitHub] -[2.1.0] underscore in site url breaks admin redirect - The page isn't redirecting properly #5809
parent 334ddd79
Branches
No related merge requests found
......@@ -205,6 +205,7 @@ class InstallStoreConfigurationCommand extends AbstractSetupCommand
public function validate(InputInterface $input)
{
$errors = [];
$errorMsg = '';
$options = $input->getOptions();
foreach ($options as $key => $value) {
if (!$value) {
......@@ -220,9 +221,7 @@ class InstallStoreConfigurationCommand extends AbstractSetupCommand
StoreConfigurationDataMapper::KEY_BASE_URL,
['http', 'https']
);
if ($errorMsg !== '') {
$errors[] = $errorMsg;
}
break;
case StoreConfigurationDataMapper::KEY_LANGUAGE:
$errorMsg = $this->validateCodes(
......@@ -230,9 +229,6 @@ class InstallStoreConfigurationCommand extends AbstractSetupCommand
$value,
StoreConfigurationDataMapper::KEY_LANGUAGE
);
if ($errorMsg !== '') {
$errors[] = $errorMsg;
}
break;
case StoreConfigurationDataMapper::KEY_TIMEZONE:
$errorMsg = $this->validateCodes(
......@@ -240,9 +236,6 @@ class InstallStoreConfigurationCommand extends AbstractSetupCommand
$value,
StoreConfigurationDataMapper::KEY_TIMEZONE
);
if ($errorMsg !== '') {
$errors[] = $errorMsg;
}
break;
case StoreConfigurationDataMapper::KEY_CURRENCY:
$errorMsg = $this->validateCodes(
......@@ -250,62 +243,39 @@ class InstallStoreConfigurationCommand extends AbstractSetupCommand
$value,
StoreConfigurationDataMapper::KEY_CURRENCY
);
if ($errorMsg !== '') {
$errors[] = $errorMsg;
}
break;
case StoreConfigurationDataMapper::KEY_USE_SEF_URL:
$errorMsg = $this->validateBinaryValue($value, StoreConfigurationDataMapper::KEY_USE_SEF_URL);
if ($errorMsg !== '') {
$errors[] = $errorMsg;
}
break;
case StoreConfigurationDataMapper::KEY_IS_SECURE:
$errorMsg = $this->validateBinaryValue($value, StoreConfigurationDataMapper::KEY_IS_SECURE);
if ($errorMsg !== '') {
$errors[] = $errorMsg;
}
break;
case StoreConfigurationDataMapper::KEY_BASE_URL_SECURE:
try {
$errorMsg = $this->validateUrl(
$value,
StoreConfigurationDataMapper::KEY_BASE_URL_SECURE,
['https']
);
if ($errorMsg !== '') {
$errors[] = $errorMsg;
}
} catch (LocalizedException $e) {
$errors[] = '<error>' . 'Command option \'' . StoreConfigurationDataMapper::KEY_BASE_URL_SECURE
. '\': ' . $e->getLogMessage() .'</error>';
}
$errorMsg = $this->validateUrl(
$value,
StoreConfigurationDataMapper::KEY_BASE_URL_SECURE,
['https']
);
break;
case StoreConfigurationDataMapper::KEY_IS_SECURE_ADMIN:
$errorMsg = $this->validateBinaryValue($value, StoreConfigurationDataMapper::KEY_IS_SECURE_ADMIN);
if ($errorMsg !== '') {
$errors[] = $errorMsg;
}
break;
case StoreConfigurationDataMapper::KEY_ADMIN_USE_SECURITY_KEY:
$errorMsg = $this->validateBinaryValue(
$value,
StoreConfigurationDataMapper::KEY_ADMIN_USE_SECURITY_KEY
);
if ($errorMsg !== '') {
$errors[] = $errorMsg;
}
break;
case StoreConfigurationDataMapper::KEY_JS_LOGGING:
$errorMsg = $this->validateBinaryValue(
$value,
StoreConfigurationDataMapper::KEY_JS_LOGGING
);
if ($errorMsg !== '') {
$errors[] = $errorMsg;
}
break;
}
if ($errorMsg !== '') {
$errors[] = $errorMsg;
}
}
return $errors;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment