Warnings when exporting submissions with empty composite element

Created on 7 July 2025, about 6 hours ago

Problem/Motivation

There can warnings during export of the submissions with empty composite element.
In our case it's address element. Not sure if it was added after some submissions were already created for the form.
But during export we've noticed the warning:
Warning: Trying to access array offset on null in Drupal\webform\Plugin\WebformElement\WebformCompositeBase->buildExportRecord() (line 800 of modules/contrib/webform/src/Plugin/WebformElement/WebformCompositeBase.php).

Steps to reproduce

Create webform. Create submissions. Add address element. Create submissions.
Go to Download tab on the results page. Enable the address element in the export configs. Try to download the results. Find warning in recent logs.

Proposed resolution

Improve condition in line 800 of the WebformCompositeBase

πŸ› Bug report
Status

Active

Version

6.3

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine khiminrm

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

Comments & Activities

Production build 0.71.5 2024