diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 8c949db..9710d6f 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -504,14 +504,16 @@ function install_begin_request(&$install_state) { } } + // Override the module list with a minimal set of modules. $module_handler = \Drupal::moduleHandler(); + $module_list = array(); if (!$module_handler->moduleExists('system')) { - // Override the module list with a minimal set of modules. - $module_handler->setModuleList(array('system' => 'core/modules/system/system.module')); + $module_list['system'] = 'core/modules/system/system.module'; } if ($profile && !$module_handler->moduleExists($profile)) { - $module_handler->setModuleList(array($profile => $install_state['profiles'][$profile]->uri)); + $module_list[$profile] = $install_state['profiles'][$profile]->uri; } + $module_handler->setModuleList($module_list); $module_handler->loadAll(); // Prepare for themed output. We need to run this at the beginning of the @@ -1321,8 +1323,11 @@ function _install_select_profile(&$install_state) { $profile = reset($install_state['profiles']); return $profile->name; } - if (!empty($install_state['parameters']['profile']) && ($profile = $install_state['parameters']['profile']) && isset($install_state['profiles'][$profile])) { - return $install_state['profiles'][$profile]->name; + if (!empty($install_state['parameters']['profile'])) { + $profile = $install_state['parameters']['profile']; + if (isset($install_state['profiles'][$profile])) { + return $install_state['profiles'][$profile]->name; + } } // Check for a distribution profile. foreach ($install_state['profiles'] as $profile) {