Warning: Trying to access array offset on value of type bool in _easy_breadcrumb_obtain_segment_title() (line 499 of easy_breadcrumb.module).

function _easy_breadcrumb_obtain_segment_title($normal_path, $valid_path, $segment_text) {
  // If path is valid then try to obtain the title from the menu router
  // (if available).
  if ($valid_path) {
    $router_item = menu_get_item($normal_path);
    // If not using segment text as title then use the menu router title.
    if (!variable_get(EasyBreadcrumbConstants::DB_VAR_SEGMENT_TEXT_AS_TITLE, FALSE)) {
      $title = $router_item['title'];
    }
  }
  // Just infer the title from the segment text.
  if (!isset($title) || $title === '') {
    $title = _easy_breadcrumb_normalize_text($segment_text);
  }
  return $title;
}

So if there's a valid path, but no menu item for it, then menu_get_item() returns FALSE, which causes the issue.

To reproduce the issue:

  1. Create a URL redirect from something like /node/2 (a non-existent node) to an external website. This is useful if you deleted a node and need to redirect users to an external site.
  2. Visit /node/2/edit
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

solideogloria created an issue. See original summary.

solideogloria’s picture

Status: Active » Needs review

Greg Boggs made their first commit to this issue’s fork.

greg boggs’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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