Index: dhtml_menu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/dhtml_menu/dhtml_menu.module,v
retrieving revision 1.29.2.13
diff -u -p -r1.29.2.13 dhtml_menu.module
--- dhtml_menu.module   29 Dec 2008 23:24:55 -0000      1.29.2.13
+++ dhtml_menu.module   8 Jan 2009 09:21:08 -0000
@@ -46,6 +46,7 @@ function dhtml_menu_theme_menu_item_link
   if (!isset($disabled)) {
     $disabled = variable_get('dhtml_menu_disabled', array());
     $theme = variable_get('dhtml_menu_theme_menu_item_link', 'theme_menu_item_link');
+    $theme = function_exists($theme) ? $theme : 'theme_menu_item_link';
   }

   // Only work with menu items that have an mlid and a menu name.
@@ -79,6 +80,7 @@ function dhtml_menu_theme_menu_item($lin
     $cookie = !empty($_COOKIE['dhtml_menu']) && empty($settings['siblings']) ? explode(',', $_COOKIE['dhtml_menu']) : array();
     // Cascade up to the original theming function.
     $theme = variable_get('dhtml_menu_theme_menu_item', 'theme_menu_item');
+    $theme = function_exists($theme) ? $theme : 'theme_menu_item';
   }

   /* When theme('menu_item') is called, the menu tree below it has been
@@ -171,7 +173,7 @@ function _dhtml_menu_subtree($stack) {
     }
     $tree = $tree[$key]['below'];
   }
-  return $tree;
+  return is_array($tree) ? $tree : array();
 }

 /**
