Fatal error 'Unsupported operand types' on 404

meerkat - October 17, 2009 - 17:02
Project:Node breadcrumb
Version:6.x-1.0-beta5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Fatal error: Unsupported operand types in /var/www/pinpoint/includes/common.inc on line 1582

when retrieving a non-existent URL.

Tracked down by trial and error to line 68 of node_breadcrumb.module:

function node_breadcrumb_init() {
  $menu_item = menu_get_item();
  drupal_get_title();
  menu_set_active_menu_name(db_result(db_query("select menu_name from {menu_links} where link_path='%s'", $menu_item['href'])));
}

Changed to:

function node_breadcrumb_init() {
  $menu_item = menu_get_item();
  if($menu_item) {
    drupal_get_title();
    menu_set_active_menu_name(db_result(db_query("select menu_name from {menu_links} where link_path='%s'", $menu_item['href'])));
  }
}

Not sure if this is a fudge, but 404s are displaying again and correct breadcrumbs are being displayed for the rules I've set up.

(Great module btw, couldn't deliver sites without it)

#1

edhel - October 22, 2009 - 11:34
Status:active» fixed

fixed in beta6

#2

System Message - November 5, 2009 - 11:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.