Problem/Motivation

As per the hook_system_breadcrumb_alter contains an unnecessary by reference notation need to update the layout_builder_system_breadcrumb_alter hook.

Proposed resolution

Remove & for $breadcrumb from layout_builder_system_breadcrumb_alter hook.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

Hardik_Patel_12 created an issue. See original summary.

hardik_patel_12’s picture

Kindly review a patch.

hardik_patel_12’s picture

Assigned: hardik_patel_12 » Unassigned
Status: Needs work » Needs review
abhisekmazumdar’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new174.66 KB

The patch looks good to me.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Closed (works as designed)

The convention is to copy the full hook signature, even if you don't need the additional parameters or certain properties by reference. This is to reduce confusion in the future.

avpaderno’s picture

Status: Closed (works as designed) » Closed (duplicate)
Related issues: +#3099296: hook_system_breadcrumb_alter contains an unnecessary by reference notation

This is already being handled in #3099296: hook_system_breadcrumb_alter contains an unnecessary by reference notation. See comment #6 in that issue, from alexpott, where he says:

Anyhow let's fix layout_builder_system_breadcrumb_alter() here too and core will be consistent.