Null coalescing operator needed for block_class when saving

Created on 2 May 2024, 11 months ago

Problem/Motivation

TypeError: array_merge(): Argument #1 must be of type array, null given in array_merge() (line 967 of modules/contrib/block_class/src/Service/BlockClassHelperService.php).

Steps to reproduce

Error is happing when saving the block and providing configuration under the page restriction

Proposed resolution

path: modules/contrib/block_class/src/Service/BlockClassHelperService.php

line number 948 we need to add [] in case of null like this: $third_party_settings = $form_state->getValue('class')['third_party_settings'] ?? [];

Remaining tasks

Create pull requests and review

🐛 Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

🇮🇳India Pradip Mehta Delhi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024