From e88bbeaa083c9d8309b6879259c460ca977410f3 Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Sun, 11 Oct 2015 16:30:18 -0400 Subject: Issue #619542 by dcrocks, bfroehle, catch, amontero, jayeshanandani, malcomio, JohnAlbin, olamaekle: Malformed theme .info files break menu_router generation --- modules/system/system.module | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules') 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); -- cgit v1.2.3