TypeError: array_merge_recursive(): Argument #2 must be of type array, null given

Created on 7 July 2025, 25 days ago

Problem/Motivation

A fatal error triggered from line 123 at LinkIterator.php
Warning: Undefined array key "attributes" in Drupal\translatable_menu_link_uri\LinkIterator->updateOptions()

Steps to reproduce

Possible reason: external link does not have `attribute` key for `$overridden_options['attributes']`

Proposed resolution

Apply a default `attributes` or do a null check for $overridden_options at line 123, e.g.:
$overridden_options['attributes'] = array_merge_recursive($options['attributes'], $overridden_options['attributes'] ?? []) ;

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

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