diff options
author | David Rothstein <drothstein@gmail.com> | 2015-10-11 16:30:18 -0400 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2015-10-11 16:30:18 -0400 |
commit | e88bbeaa083c9d8309b6879259c460ca977410f3 (patch) | |
tree | 711c8d367e28b39532441436cd7558411328ecbe /modules | |
parent | 6379101933142e2eeaea2f4eb41f4d32a9e47531 (diff) | |
download | brdo-e88bbeaa083c9d8309b6879259c460ca977410f3.tar.gz brdo-e88bbeaa083c9d8309b6879259c460ca977410f3.tar.bz2 |
Issue #619542 by dcrocks, bfroehle, catch, amontero, jayeshanandani, malcomio, JohnAlbin, olamaekle: Malformed theme .info files break menu_router generation
Diffstat (limited to 'modules')
-rw-r--r-- | modules/system/system.module | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/system/system.module b/modules/system/system.module index c2aa9e07b..d0dda18dc 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -2411,6 +2411,10 @@ function _system_rebuild_module_data() { // Merge in defaults and save. $modules[$key]->info = $module->info + $defaults; + // The "name" key is required, but to avoid a fatal error in the menu system + // we set a reasonable default if it is not provided. + $modules[$key]->info += array('name' => $key); + // Prefix stylesheets and scripts with module path. $path = dirname($module->uri); if (isset($module->info['stylesheets'])) { @@ -2546,6 +2550,10 @@ function _system_rebuild_theme_data() { $themes[$key]->filename = $theme->uri; $themes[$key]->info = drupal_parse_info_file($theme->uri) + $defaults; + // The "name" key is required, but to avoid a fatal error in the menu system + // we set a reasonable default if it is not provided. + $themes[$key]->info += array('name' => $key); + // Add the info file modification time, so it becomes available for // contributed modules to use for ordering theme lists. $themes[$key]->info['mtime'] = filemtime($theme->uri); |