Issue #3259807 by idebr, anneke_vde: #type => 'toolbar_item' without a tab triggers a deprecation notice on PHP8.1

merge-requests/1814/head
catch 2022-02-14 16:40:23 +00:00
parent 22859f81b3
commit b9e078a0f3
2 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class ToolbarItem extends RenderElement {
],
'tab' => [
'#type' => 'link',
'#title' => NULL,
'#title' => '',
'#url' => Url::fromRoute('<front>'),
],
];

View File

@ -45,6 +45,9 @@ function toolbar_test_toolbar() {
],
'#weight' => 50,
];
$items['empty'] = [
'#type' => 'toolbar_item',
];
return $items;
}