diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index 08cf959..193ab8f 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -520,19 +520,19 @@ protected function initializeContainer() { if (isset($this->container)) { // All namespaces must be registered before we attempt to use any service // from the container. + $container_modules = (array) $this->container->getParameter('container.modules'); + $container_themes = (array) $this->container->getParameter('container.themes'); $namespaces_before = $this->classLoader->getPrefixes(); - $container_modules = $this->container->getParameter('container.modules'); $this->registerNamespaces($this->getNamespaces($container_modules)); - $container_themes = $this->container->getParameter('container.themes'); $this->registerNamespaces($this->getNamespaces($container_themes)); // If 'container.modules' or 'container.themes' is wrong, the container // must be rebuilt. if (!isset($this->moduleList)) { - $this->moduleList = $this->container->get('config.factory')->get('system.module')->load()->get('enabled'); + $this->moduleList = (array) $this->container->get('config.factory')->get('system.module')->load()->get('enabled'); } if (!isset($this->themeList)) { - $this->themeList = $this->container->get('config.factory')->get('system.theme')->load()->get('enabled'); + $this->themeList = (array) $this->container->get('config.factory')->get('system.theme')->load()->get('enabled'); } if (array_keys($this->moduleList) !== array_keys($container_modules) || array_keys($this->themeList) !== array_keys($container_themes)) { $persist = $this->getServicesToPersist(); @@ -618,7 +618,7 @@ protected function buildContainer() { $container->setParameter('container.themes', $this->getThemeFileNames()); // Get a list of namespaces and put it onto the container. - $namespaces = $this->getNamespaces(array_merge_recursive($this->getModuleFileNames(), $this->getThemeFileNames())); + $namespaces = $this->getNamespaces(array_merge($this->getModuleFileNames(), $this->getThemeFileNames())); // Add all components in \Drupal\Core and \Drupal\Component that have a // Plugin directory.