Null context in getLayout() causes potential null reference errors

Created on 15 November 2024, 2 months ago

Problem/Motivation

The getLayout() method in Drupal\layout_library\Plugin\SectionStorage\Library relies on getSectionList(), which may return NULL if the necessary layout context is missing/not required. This creates potential for null reference errors in dependent methods, such as initLayoutOverrides() which assumes getLayout() will always return a valid layout instance.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain tuwebo

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