Wireless Army
This is a blog / tips and tricks website for web developers and security researchers.
follow us in feedly


Undefined distribution name
by admin
 at 2017-04-09 01:54:00.

if you get an error like this:

Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 207 of includes/install.inc).

you should go to that file (includes/install.inc) at the line 204 when you have some thing like this

else {
    $profile = drupal_get_profile();
    $info = system_get_info('module', $profile);
     return $info['distribution_name'];
  }
}

just add this like before the return distribution name.

 if ( ! array_key_exists('distribution_name', $info)) $info['distribution_name'] = 'Drupal';

like so:

else {
    $profile = drupal_get_profile();
    $info = system_get_info('module', $profile);
    if ( ! array_key_exists('distribution_name', $info)) $info['distribution_name'] = 'Drupal';
    return $info['distribution_name'];
  }
}