Typed property must not be accessed before initialisation

Created on 3 September 2024, 4 months ago

When locally exporting a batched XLSX export of Webform submission results on a Drupal 10 site running on PHP 8.1, I'm seeing the following error once I reach the second batch of results:
Error: Typed property Drupal\webform_xlsx_export\Plugin\WebformExporter\XlsxExporter::$xls must not be accessed before initialization in Drupal\webform_xlsx_export\Plugin\WebformExporter\XlsxExporter->openExport() (line 84 of modules/contrib/webform_xlsx_export/src/Plugin/WebformExporter/XlsxExporter.php).

From reading a couple similar issues in other modules ( πŸ› Typed property must not be accessed before initialisation Fixed , πŸ› Typed property must not be accessed before initialisation Active ), this can be fixed by giving the typed property $xls a default value. In my testing, that appears to fix it for me. MR forthcoming.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kurttrowbridge

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