Unsetting title can result in PHP warning

Created on 26 March 2024, 10 months ago
Updated 9 April 2024, 10 months ago

Problem/Motivation

Unsetting the "#title" of a render array probably shouldn't be done. Let's just set it to empty instead.

Warning: Undefined array key "#title" in Drupal\Core\Render\Element\Link::preRenderLink() (line 95 of core/lib/Drupal/Core/Render/Element/Link.php).

Steps to reproduce

Add a Branch Social block to the page when PHP warnings are displayed.

Proposed resolution

Set it to empty instead of unsetting.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States froboy Chicago, IL

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