diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-15 10:59:03 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-15 10:59:03 +0000 |
commit | 8cc5f17b58e60c236bacfd077fb431ab03eab565 (patch) | |
tree | b244f50af1d4f758ba91e748d71720cafe863d60 /modules/system/system.admin.inc | |
parent | d2a9e857d94a2ca4ae5c9a91d2f11eaa37306f40 (diff) | |
download | brdo-8cc5f17b58e60c236bacfd077fb431ab03eab565.tar.gz brdo-8cc5f17b58e60c236bacfd077fb431ab03eab565.tar.bz2 |
#190729 by aufumy, Pasqualle, slightly modified: report incompatibility early, if the dependencies key is not an array in the .info file
Diffstat (limited to 'modules/system/system.admin.inc')
-rw-r--r-- | modules/system/system.admin.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 75f3dcbe3..ef99085d8 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -576,6 +576,14 @@ function _system_is_incompatible(&$incompatible, $files, $file) { if (isset($incompatible[$file->name])) { return TRUE; } + // The 'dependencies' key in .info files was a string in Drupal 5, but changed + // to an array in Drupal 6. If it is not an array, the module is not + // compatible and we can skip the check below which requires an array. + if (!is_array($file->info['dependencies'])) { + $file->info['dependencies'] = array(); + $incompatible[$file->name] = TRUE; + return TRUE; + } // Recursively traverse the dependencies, looking for incompatible modules foreach ($file->info['dependencies'] as $dependency) { if (isset($files[$dependency]) && _system_is_incompatible($incompatible, $files, $files[$dependency])) { |