diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/DeploymentConfig/BackendConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/DeploymentConfig/BackendConfigTest.php index 903f8e6756fdc..f5c6d2fcaf282 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/DeploymentConfig/BackendConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/DeploymentConfig/BackendConfigTest.php @@ -23,11 +23,20 @@ public function testGetData() * @expectedException \InvalidArgumentException * @expectedExceptionMessage No backend frontname provided. */ - public function testEmptyData() + public function testUnsetData() { new BackendConfig([]); } + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Empty backend frontname provided. + */ + public function testEmptyData() + { + new BackendConfig(['frontName' => '']); + } + /** * @param array $data * @dataProvider invalidDataDataProvider diff --git a/lib/internal/Magento/Framework/App/DeploymentConfig/BackendConfig.php b/lib/internal/Magento/Framework/App/DeploymentConfig/BackendConfig.php index 597fafb82dc79..62ee7b81e34e8 100644 --- a/lib/internal/Magento/Framework/App/DeploymentConfig/BackendConfig.php +++ b/lib/internal/Magento/Framework/App/DeploymentConfig/BackendConfig.php @@ -28,6 +28,9 @@ public function __construct(array $data) if (!isset($data[self::KEY_FRONTNAME])) { throw new \InvalidArgumentException("No backend frontname provided."); } + if ($data[self::KEY_FRONTNAME] === '') { + throw new \InvalidArgumentException("Empty backend frontname provided."); + } if (!preg_match('/^[a-zA-Z0-9_]+$/', $data[self::KEY_FRONTNAME])) { throw new \InvalidArgumentException("Invalid backend frontname {$data[self::KEY_FRONTNAME]}"); } diff --git a/setup/pub/magento/setup/landing.js b/setup/pub/magento/setup/landing.js index 60d9a3b8076cc..2b9279e6228c1 100644 --- a/setup/pub/magento/setup/landing.js +++ b/setup/pub/magento/setup/landing.js @@ -9,6 +9,7 @@ angular.module('landing', ['ngStorage']) '$location', '$localStorage', function ($scope, $location, $localStorage) { + $localStorage.$reset(); $scope.selectLanguage = function () { $localStorage.lang = $scope.modelLanguage; window.location = 'index.php/' + $scope.modelLanguage + '/index'; diff --git a/setup/pub/magento/setup/main.js b/setup/pub/magento/setup/main.js index 0d7e33104d2f6..e4686f88b67df 100644 --- a/setup/pub/magento/setup/main.js +++ b/setup/pub/magento/setup/main.js @@ -4,7 +4,7 @@ 'use strict'; var main = angular.module('main', ['ngStorage']); -main.controller('navigationController', ['$scope', '$state', '$rootScope', 'navigationService', '$localStorage', function ($scope, $state, $rootScope, navigationService, $localStorage) { +main.controller('navigationController', ['$scope', '$state', '$rootScope', 'navigationService', function ($scope, $state, $rootScope, navigationService) { navigationService.load(); $rootScope.isMenuEnabled = true; $scope.itemStatus = function (order) {