WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Bug: Exporting to CSV results in PHP fatal error 'Class "PhpOffice\PhpSpreadsheet\Spreadsheet" not found' #525

@newton730ia

Description

@newton730ia

Exporting to CSVs results in 500error/PHP error

[11-Jan-2022 13:02:12 UTC] PHP Fatal error:  Uncaught Error: Class "PhpOffice\PhpSpreadsheet\Spreadsheet" not found in /wp-content/plugins/torro-forms/src/components/submission-export-csv.php:47
Stack trace:
#0 /wp-content/plugins/torro-forms/src/components/submission-export.php(132): awsmug\Torro_Forms\Components\Submission_Export_CSV->generate_export_from_data()
#1 /wp-content/plugins/torro-forms/src/components/submission-export-handler.php(95): awsmug\Torro_Forms\Components\Submission_Export->export_submissions()
#2 /wp-content/plugins/torro-forms/src/components/submission-export-handler.php(155): awsmug\Torro_Forms\Components\Submission_Export_Handler->export_submissions()
#3 /wp-includes/class-wp-hook.php(301): awsmug\Torro_Forms\Components\Submission_Export_Handler->handle_export_action()
#4 /wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
#5 /wp-includes/plugin.php(470): WP_Hook->do_action()
#6 /wp-admin/admin.php(408): do_action()
#7 {main}
  thrown in /wp-content/plugins/torro-forms/src/components/submission-export-csv.php on line 47

In submission-export-csv.php
use PhpOffice\PhpSpreadsheet\Spreadsheet; and later $spreadsheet = new Spreadsheet(); is called, but PhpOffice is not included any more in vendor-directory.

Version 1.0.16

Problem stems from removing XLS-Library in commit a6ee357 without rewriting the CSV-export (still uses now removed library)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions