Undefined array key "name" in system_requirements() (line 34 di /var/www/html/web/modules/system/system.install

Created on 11 August 2023, 10 months ago

Problem/Motivation

I get this error with drupal 7.98 and PHP 8.2

Warning: Undefined array key "name" in system_requirements() (linea 34 di /var/www/html/web/modules/system/system.install).
Warning: Undefined array key "version" in system_requirements() (linea 36 di /var/www/html/web/modules/system/system.install).

Thank you

🐛 Bug report
Status

Postponed: needs info

Version

7.0 ⚰️

Component
System 

Last updated 2 days ago

No maintainer
Created by

🇮🇹Italy trickfun

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @trickfun
  • Status changed to Postponed: needs info 10 months ago
  • 🇸🇰Slovakia poker10

    Thanks for reporting this. This warning is not present on the clean D7 installation. Looking at the code, I suppose that the site could be using an installation profile which is not available anymore and therefore system_get_info('module', $profile) would return an empty array. See:

        // Display the currently active installation profile, if the site
        // is not running the default installation profile.
        $profile = drupal_get_profile();
        if ($profile != 'standard') {
          $info = system_get_info('module', $profile);
          $requirements['install_profile'] = array(
            'title' => $t('Install profile'),
            'value' => $t('%profile_name (%profile-%version)', array(
              '%profile_name' => $info['name'],
              '%profile' => $profile,
              '%version' => $info['version']
            )),
            'severity' => REQUIREMENT_INFO,
            'weight' => -9
          );
        }
    

    Can you please provide more information? Thanks!

Production build 0.69.0 2024