You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught TypeError: PhpOffice\PhpSpreadsheet\Writer\Xlsx\Chart::writePlotGroup(): Argument #6 ($plotGroupingType) must be of type string, null given
#3975
Open
3 of 9 tasks
homersimpsons opened this issue
Apr 6, 2024
· 0 comments
· May be fixed by #3976
This is:
What is the expected behavior?
PhpSpreadsheet sould not fail loading and writing this file
What is the current behavior?
PhpSpreasheet throws a TypeError when writing the file
What are the steps to reproduce?
(for now I do not have a reproduction without an excel file)
Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:
Here is the file: example_plot_grouping_type_null.xlsx
Note that I was able to generate such a file from scratch on Google Sheet: sheet_with_combo_chart.xlsx
What features do you think are causing the issue
Does an issue affect all spreadsheet file formats? If not, which formats are affected?
I'm not sure
Which versions of PhpSpreadsheet and PHP are affected?
Latest version of PhpSpreadsheet (2.0.0) with PHP 8.1.2-1ubuntu2.14 (but should be any supported php version.
Analysis
This most likely is caused because the following call can return
null
:PhpSpreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php
Line 1127 in e63e8a9
And because the parameter is passed by reference:
PhpSpreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php
Line 1115 in e63e8a9
Thank you for this awesome library!
The text was updated successfully, but these errors were encountered: