Edge case: Illegal offset error in Drupal FormBuilder

Created on 19 April 2023, about 1 year ago
Updated 19 May 2024, 28 days ago

Problem/Motivation

Under some rare circumstances, the \Drupal\gin\GinContentFormHelper::formAlter may set the $form['gin_sidebar']['actions']['#type'] to an empty array which then can lead to an illegal offset exception in Drupal's \Drupal\Core\Form\FormBuilder::doBuildForm at line 1030 where it calls $this->elementInfo->getInfo($element[$key]['#type'])

Proposed resolution

The default value should not be set to an empty array but to the string actions.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024