diff -u b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php --- b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php +++ b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php @@ -93,14 +93,18 @@ $module_list_scan = $listing->scan('module'); $module_list = array(); foreach (array_keys($modules) as $module) { - $module_list[$module] = $module_list_scan[$module]; + if (isset($module_list_scan[$module])) { + $module_list[$module] = $module_list_scan[$module]; + } } $this->folders += $this->getComponentNames($module_list); } if (!empty($extensions['theme'])) { $theme_list_scan = $listing->scan('theme'); foreach (array_keys($extensions['theme']) as $theme) { - $theme_list[$theme] = $theme_list_scan[$theme]; + if (isset($theme_list_scan[$theme])) { + $theme_list[$theme] = $theme_list_scan[$theme]; + } } $this->folders += $this->getComponentNames($theme_list); } @@ -112,8 +116,10 @@ $profile = drupal_get_profile(); if (isset($profile)) { $profile_list = $listing->scan('profile'); - $profile_folders = $this->getComponentNames(array($profile_list[$profile])); - $this->folders = $profile_folders + $this->folders; + if (isset($profile_list[$profile])) { + $profile_folders = $this->getComponentNames(array($profile_list[$profile])); + $this->folders = $profile_folders + $this->folders; + } } } } diff -u b/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php --- b/core/lib/Drupal/Core/Config/InstallStorage.php +++ b/core/lib/Drupal/Core/Config/InstallStorage.php @@ -162,7 +162,9 @@ $listing = new ExtensionDiscovery(DRUPAL_ROOT); if ($profile = drupal_get_profile()) { $profile_list = $listing->scan('profile'); - $this->folders += $this->getComponentNames(array($profile_list[$profile])); + if (isset($profile_list[$profile])) { + $this->folders += $this->getComponentNames(array($profile_list[$profile])); + } } $this->folders += $this->getComponentNames($listing->scan('module')); $this->folders += $this->getComponentNames($listing->scan('theme')); diff -u b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php --- b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php +++ b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php @@ -125,9 +125,8 @@ */ public function scan($type, $include_tests = NULL) { // Determine the installation profile directories to scan for extensions, - // unless explicit profile directories have been set. Exclude profiles - // as we can't have profiles within profiles. - if (!isset($this->profileDirectories) && $type != 'profile') { + // unless explicit profile directories have been set. + if (!isset($this->profileDirectories)) { $this->setProfileDirectoriesFromSettings(); } @@ -135,8 +134,9 @@ */ public function scan($type, $include_tests = NULL) { // Determine the installation profile directories to scan for extensions, - // unless explicit profile directories have been set. - if (!isset($this->profileDirectories)) { + // unless explicit profile directories have been set. Exclude profiles + // as we can't have profiles within profiles. + if (!isset($this->profileDirectories) && $type != 'profile') { $this->setProfileDirectoriesFromSettings(); } diff -u b/core/modules/system/src/Tests/Bootstrap/GetFilenameUnitTest.php b/core/modules/system/src/Tests/Bootstrap/GetFilenameUnitTest.php --- b/core/modules/system/src/Tests/Bootstrap/GetFilenameUnitTest.php +++ b/core/modules/system/src/Tests/Bootstrap/GetFilenameUnitTest.php @@ -17,13 +17,6 @@ class GetFilenameUnitTest extends KernelTestBase { /** - * The container used by the test, moved out of the way. - * - * @var \Symfony\Component\DependencyInjection\ContainerInterface - */ - protected $previousContainer; - - /** * Tests that drupal_get_filename() works when the file is not in database. */ function testDrupalGetFilename() {