? node_breadcrumb.features.inc
Index: node_breadcrumb.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/node_breadcrumb/node_breadcrumb.module,v
retrieving revision 1.26
diff -u -p -r1.26 node_breadcrumb.module
--- node_breadcrumb.module	22 Oct 2009 11:27:09 -0000	1.26
+++ node_breadcrumb.module	13 Jan 2011 02:14:40 -0000
@@ -4,6 +4,16 @@
 function _node_breadcrumb_set_location($mid, $last_path, $last_title) {
   $add_active_class = variable_get('node_breadcrumb_add_active_class', FALSE);
   $menu_item = menu_link_load($mid);
+
+  if (empty($menu_item)) {
+    // Setting a node breadcrumb rule with a non-existent or deleted menu id causes
+    // strange errors (the rule removes all navigation) so the import will fail if
+    // the mlid is invalid.
+    // Ensure that doesn't happen
+    watchdog('node_breadcrumb', 'Node breadcrumb rule refers to a non-existent menu link id. Ignoring', array(), WATCHDOG_ERROR);
+    return;
+  }      
+  
   menu_local_tasks(0);
   menu_local_tasks(1);
   menu_set_item($_GET['q'], $menu_item);
