BUGFIX: Ensure $items isn't null in GridFieldDetailForm_ItemRequest->Breadcrumbs() prior to performing operations on it.

This commit is contained in:
Tom Yrjas 2020-06-29 14:12:01 +03:00
parent 64688dbc10
commit 824b5e0b67

View File

@ -786,6 +786,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
/** @var ArrayList $items */
$items = $this->popupController->Breadcrumbs($unlinked);
if ($items) {
if ($this->record && $this->record->ID) {
$title = ($this->record->Title) ? $this->record->Title : "#{$this->record->ID}";
$items->push(new ArrayData([
@ -798,6 +799,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
'Link' => false
]));
}
}
$this->extend('updateBreadcrumbs', $items);
return $items;