Index: system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.585.2.50 diff -u -p -r1.585.2.50 system.module --- system.module 4 Mar 2010 00:25:13 -0000 1.585.2.50 +++ system.module 28 May 2010 21:37:56 -0000 @@ -624,7 +624,14 @@ function system_block($op = 'list', $del function system_admin_menu_block($item) { $content = array(); if (!isset($item['mlid'])) { - $item += db_fetch_array(db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.router_path = '%s' AND module = 'system'", $item['path'])); + if ($row = db_fetch_array(db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.router_path = '%s' AND ml.module = 'system'", $item['path']))) { + $item += $row; + } + else { + watchdog('php', 'No system menu_links record found for router_path "%path"', array('%path' => $item['path']), WATCHDOG_ERROR); + drupal_set_message(t('No system menu_links record found for router_path "%path"', array('%path' => $item['path'])), 'error'); + return array(); + } } $result = db_query(" SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, m.description, ml.*