custom_breadcrumbs_identifiers.module returns an array for the breadcrumb in the book trail when is being used, but since the trail is empty, the returned array is empty.
custom_breadcrumbs.module in line 395 loops trough the items array, but breaks when the array is empty.
A working solution is checking if the array is empty:
// Use the returned items to set the trail.
foreach ($items as $item) {
if(!empty($item)) {
if ($item['crumb']) {
$trail[] = $item['crumb'];
}
if (variable_get('custom_breadcrumbs_force_active_trail', FALSE)) {
$locations[] = array(
'title' => $item['title'],
'href' => drupal_get_normal_path(trim($item['href'])),
);
}
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | custom_breadcrumbs_item-array-error_1280980_1.patch | 964 bytes | dafeder |
Comments
Comment #1
dafederWorked for me too. Here's a patch.
Comment #3
lamp5