Empty Custom Field array triggers error

Created on 2 November 2023, about 1 year ago
Updated 14 June 2024, 5 months ago

Problem/Motivation

The module triggered an error in a custom block I wrote when installed. I'm not sure why the error was triggered but I did successfully patch the code.

Steps to reproduce

Proposed resolution

In , add the following three lines:

  if (is_null($customFields)) {
    $customFields = [];
  }

After these lines:

function file_upload_options_process_custom_fields(array &$form) {
  $config = \Drupal::service('config.factory')->getEditable('file_upload_options.settings');
  $customFields = $config->get('custom_fields');

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Component

Code

Created by

🇺🇸United States gaelicmichael

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024