Index: system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.933
diff -u -p -r1.933 system.module
--- system.module	20 May 2010 08:47:00 -0000	1.933
+++ system.module	28 May 2010 21:37:09 -0000
@@ -1982,7 +1982,14 @@ function system_block_view($delta = '') 
 function system_admin_menu_block($item) {
   $cache = &drupal_static(__FUNCTION__, array());
   if (!isset($item['mlid'])) {
-    $item += db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.router_path = :path AND module = 'system'", array(':path' => $item['path']))->fetchAssoc();
+    if ($row = db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.router_path = :path AND ml.module = 'system'", array(':path' => $item['path']))->fetchAssoc()) {
+      $item += $row;
+    }
+    else {
+      watchdog('menu', '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();
+    }
   }
 
   if (isset($cache[$item['mlid']])) {
