PhpSpreadsheet: ZipStream\ZipStream::__construct(): Argument #1 ($comment) must be of type string, null given, called in \vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Writer\ZipStream2.php on line 19
This is:
- [
// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
// add code that show the issue here...
If this is an issue with reading a specific spreadsheet file, then it may be appropriate to provide a sample file that demonstrates the problem; but please keep it as small as possible, and sanitize any confidential information before uploading.
What features do you think are causing the issue
- Reader
- Writer
- Styles
- Data Validations
- Formula Calculations
- Charts
- AutoFilter
- Form Elements
Does an issue affect all spreadsheet file formats? If not, which formats are affected?
Which versions of PhpSpreadsheet and PHP are affected?
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 15
I had the same problem with Codeigniter on Ubuntu server. I solved this way. I removed Spreadsheet with Composer. I cleared the cache with Composer. I deleted all the vendor folder. I installed Spreadsheet with composer. I uploaded all new vendor folder. it worked.
Php 8.2 CI 4.3.5
I hope it can help
I found a bad solution but I needed urgently, changing vendor class: file: ZipStream0.php
Code:
Adding this dependency to my
composer.jsondid workaround the issue:I guess the quick fix for this issue is to just adjust the dependency version of
maennchen/zipstream-phpin this repository in a similar fashion since minor version updates of that dependency seemingly are not backwards compatible.For php 8.2 compatibility it appears
also needs to be added.