lazyLinks(): array must be compatible with Drupal\shortcut\ShortcutLazyBuilders::lazyLinks

Created on 1 October 2024, about 2 months ago

Problem/Motivation

Getting an error:

Fatal error: Declaration of Drupal\shortcut_menu\ShortcutMenuLazyBuilder::lazyLinks(): array must be compatible with Drupal\shortcut\ShortcutLazyBuilders::lazyLinks(bool $show_configure_link = true) in /app/docroot/modules/contrib/shortcut_menu/src/ShortcutMenuLazyBuilder.php on line 35

Steps to reproduce

Load a page that has shortcuts on it - typically admin users who have access to use shortcuts.

Proposed resolution

I seemed to have fixed the error by looking at the original class method and matching the overridden one in `ShortcutMenuLazyBuilder`:
public function lazyLinks(bool $show_configure_link = TRUE): array {
Specifically adding the bool $show_configure_link = TRUE to the method arguments.

Remaining tasks

Create a MR for this fix.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States codechefmarc

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024