Array settings are sometimes overriden by empty values

Created on 16 October 2024, 2 months ago

Problem/Motivation

When a setting type is an array (for example, IconSettingType), there is a mechanism to merge the values of the shorthand notation ($element["#foo"]) and the ones of 'developed" notation ($element["#settings"]["foo"]):

          elseif (is_array($element[$key]) && is_array($setting)) {
            $element[$key] = array_merge($element[$key], $setting);
          }

https://git.drupalcode.org/project/ui_patterns_settings/-/blob/8.x-2.x/s...

However, valid values of the shortand notation can be overridden by empty values of the developed notation.

Proposed resolution

Filter developed notation empty values before merging.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇫🇷France pdureau Paris

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