From 08a9323836cc354ca3a84beac71778551ee7cb89 Mon Sep 17 00:00:00 2001 From: Bob Vincent Date: Mon, 26 Mar 2012 08:24:39 -0400 Subject: [PATCH] Issue #1170362 by catch, webchick, pillarsdotnet: Fix PHP notice when installing Minimal profile. --- core/includes/install.inc | 3 +++ core/modules/system/system.install | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/core/includes/install.inc b/core/includes/install.inc index 199ec1c9f20252fefc738f9169b25f484c755deb..4ea1d951ac21f75061efe6f572fc4ee5c54a1a15 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -103,6 +103,9 @@ function drupal_install_profile_distribution_name() { else { $profile = drupal_get_profile(); $info = system_get_info('module', $profile); + $info += array( + 'distribution_name' => 'Unknown', + ); return $info['distribution_name']; } } diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 905d11dfb4616803a5886c62d3d84832451339c4..d66eb116c82f063f32361e9774c35550b06433a1 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -30,11 +30,20 @@ function system_requirements($phase) { 'weight' => -10, ); - // Display the currently active install profile, if the site - // is not running the default install profile. + // Display the currently active install profile, if the site is not running + // the default install profile. $profile = drupal_get_profile(); if ($profile != 'standard') { - $info = system_get_info('module', $profile); + $modules = modules_list(); + if (isset($modules[$profile])) { + $info = system_get_info('module', $profile); + } + else { + $info = array( + 'name' => 'Unknown', + 'version' => 'Unknown', + ); + } $requirements['install_profile'] = array( 'title' => $t('Install profile'), 'value' => $t('%profile_name (%profile-%version)', array( -- 1.7.5.4