Notice: Trying to access array offset on value of type null in _webform_csv_data_file() (line 563 of /webform/components/file.inc).

Created on 20 July 2022, over 2 years ago
Updated 15 May 2023, over 1 year ago

This also affects a lot of other places like _webform_csv_data_select()

1. Create webform with a text field
2. Submit the webform
3. Add a select component to the form with 2 options
4. Export all the results
5. See notice in logs

The issue happens because $raw_data is null in webform_component_invoke($component['type'], 'csv_data', $component, $options, $raw_data)

The components expect it to not be null and try to access $raw_data[0]

Not sure if this is the best approach but I just short circuited out of that call if $raw_data was NULL.

For really large webforms this can flood the logs.

πŸ› Bug report
Status

Needs work

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States djdevin Philadelphia

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