Trying to access array offset on value of type null when no overrides in the form

Created on 20 November 2023, about 1 year ago

Problem/Motivation

When there are overrides activated on the view and there are none in the form, the code throws the next error:

Warning: Trying to access array offset on value of type null in Drupal\views_block_override\Plugin\views\display\ViewsBlockOverride->blockSubmit() (regel 275 van /var/www/html/web/modules/contrib/views_block_override/src/Plugin/views/display/ViewsBlockOverride.php

Steps to reproduce

Activate contextual filters on the view display
Do not have any contextual filter specified in the view display
Use the block in paragraphs or layout builder and save

Proposed resolution

Check if there are overrides before looping over them.

Remaining tasks

Create patch, review patch.

User interface changes

-

API changes

-

Data model changes

-

🐛 Bug report
Status

Needs review

Version

1.2

Component

Code

Created by

🇧🇪Belgium tim-diels Belgium 🇧🇪

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