diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index b8f472e020..33bf325451 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -195,7 +195,7 @@ function install_state_defaults() { 'config' => NULL, // TRUE when installing from existing configuration. 'config_install' => FALSE, - // The path to the configuration to install when installing from config. + // The path to the configuration to install when installing from config. 'profile_sync' => NULL, // TRUE when there are valid config directories. 'config_verified' => FALSE, @@ -1508,7 +1508,7 @@ function install_load_profile(&$install_state) { $profile = $install_state['parameters']['profile']; $install_state['profiles'][$profile]->load(); $install_state['profile_info'] = install_profile_info($profile, isset($install_state['parameters']['langcode']) ? $install_state['parameters']['langcode'] : 'en'); - if ($install_state['profile_info']['config_install'] && !empty($config_directories[CONFIG_SYNC_DIRECTORY])) { + if (!empty($install_state['profile_info']['config_install']) && !empty($config_directories[CONFIG_SYNC_DIRECTORY])) { $install_state['config_install'] = TRUE; $install_state['config']['system.site'] = \Drupal::service('config.storage.sync')->read('system.site'); } diff --git a/core/includes/install.inc b/core/includes/install.inc index ef4a161383..5ba241bbf0 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -1086,11 +1086,9 @@ function install_profile_info($profile, $langcode = 'en') { 'version' => NULL, 'hidden' => FALSE, 'php' => DRUPAL_MINIMUM_PHP, - 'config_install' => FALSE, - 'profile_sync' => NULL, ]; - $profile_path = drupal_get_path('profile', $profile); - $info = \Drupal::service('info_parser')->parse($profile_path . "/$profile.info.yml"); + $profile_file = drupal_get_path('profile', $profile) . "/$profile.info.yml"; + $info = \Drupal::service('info_parser')->parse($profile_file); $info += $defaults; // drupal_required_modules() includes the current profile as a dependency. @@ -1102,6 +1100,7 @@ function install_profile_info($profile, $langcode = 'en') { $info['dependencies'] = array_unique(array_merge($required, $info['dependencies'], $locale)); // If the profile has a config/sync directory use that to install drupal. + $profile_path = drupal_get_path('profile', $profile); if (is_dir($profile_path . '/config/sync')) { $info['profile_sync'] = $profile_path . '/config/sync'; $sync = new FileStorage($profile_path . '/config/sync');