Index: taxonomy_menu_trails.inc =================================================================== --- taxonomy_menu_trails.inc (revision 1271) +++ taxonomy_menu_trails.inc (working copy) @@ -30,7 +30,7 @@ $term = end($taxonomy); break; case 'first-with-menu': - for ($term = reset($taxonomy); $term !== NULL; $term = next($taxonomy)) { + for ($term = reset($taxonomy); $term !== FALSE; $term = next($taxonomy)) { $href = _taxonomy_menu_trails_get_path($term); if (db_result(db_query('SELECT COUNT(*) FROM {menu_links} WHERE link_path = "%s" AND hidden = 0', $href)) > 0) { break; @@ -38,7 +38,7 @@ } break; case 'last-with-menu': - for ($term = end($taxonomy); $term !== NULL; $term = prev($taxonomy)) { + for ($term = end($taxonomy); $term !== FALSE; $term = prev($taxonomy)) { $href = _taxonomy_menu_trails_get_path($term); if (db_result(db_query('SELECT COUNT(*) FROM {menu_links} WHERE link_path = "%s" AND hidden = 0', $href)) > 0) { break;