Fatal Error when exporting results with Excel

Created on 3 October 2016, over 7 years ago
Updated 28 August 2023, 10 months ago

Hi,

When exporting certain webforms we're receiving the following fatal error during the batch process:

Recoverable fatal error: Object of class stdClass could not be converted to string in webform_exporter_excel_xlsx->add_row() (line 27 of /vagrant/docroot/sites/all/modules/webform/includes/exporters/webform_exporter_excel_xlsx.inc).

Upon further review this is caused by:

$value = preg_replace('/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+/u', '', $value);

As there are some "values" that are arrays and objects. Notably the foreach loop kept failing when the current value is the node object of the node related to the webform.

Are node objects normally passed in the $data array? Or is this something we're not doing correctly?

πŸ› Bug report
Status

Needs work

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States nathandentzau Rhode Island

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.

  • First commit to issue fork.
  • Open on Drupal.org β†’
    Core: 7.x + Environment: PHP 8.1 & MySQL 8
    last update 10 months ago
    Not currently mergeable.
  • @nishant2312 opened merge request.
Production build 0.69.0 2024