Commit 6e3d4a33 authored by catch's avatar catch
Browse files

Issue #3259807 by idebr, anneke_vde: #type => 'toolbar_item' without a tab...

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

(cherry picked from commit b9e078a0)
parent 9052837e
Loading
Loading
Loading
Loading
+1 −1
Changes for core/modules/toolbar/src/Element/ToolbarItem.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ public function getInfo() {
      ],
      'tab' => [
        '#type' => 'link',
        '#title' => NULL,
        '#title' => '',
        '#url' => Url::fromRoute('<front>'),
      ],
    ];
+3 −0
Changes for core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -45,6 +45,9 @@ function toolbar_test_toolbar() {
    ],
    '#weight' => 50,
  ];
  $items['empty'] = [
    '#type' => 'toolbar_item',
  ];

  return $items;
}