-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
This is:
- [x] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)
This is blocking us from updating to the latest version.
What is the expected behavior?
PhpSpreadsheet does not generate warnings, phpunit errors on the warning.
What is the current behavior?
PhpSpreadsheet throws a warning in a phpunit test, I've created a reproducer below as well.
( ! ) Warning: PhpOffice\PhpSpreadsheet\Reader\Xlsx::parseRichText(): Node no longer exists in /var/www/html/latest/include/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php on line 1684
--
1 | 0.0072 | 389536 | {main}( ) | .../crash.php:0
2 | 0.1378 | 495560 | PhpOffice\PhpSpreadsheet\Reader\Xlsx->load( $filename = '/var/www/html/latest/../tests/fixtures/import/import_with_empty_rows.xlsx', $flags = ??? ) | .../crash.php:18
3 | 3.6902 | 1331304 | PhpOffice\PhpSpreadsheet\Reader\Xlsx->parseRichText( $is = class SimpleXMLElement { public $r = [0 => class SimpleXMLElement { ... }, 1 => class SimpleXMLElement { ... }] } ) | .../Xlsx.php:497
</font>
What are the steps to reproduce?
Please use the attached file.
<?php
use PhpOffice\PhpSpreadsheet\IOFactory;
require __DIR__ . '/vendor/autoload.php';
$sLocalPath = 'path/to/import_with_empty_rows.xlsx';
$sSpreadsheetType = IOFactory::identify($sLocalPath);
$oReader = IOFactory::createReader($sSpreadsheetType);
$oReader->setReadFilter(new class() implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter {
public function readCell($columnAddress, $row, $worksheetName = '') {
return $columnAddress <= 65;
}
});
$oSheet = $oReader->load($sLocalPath);Which versions of PhpSpreadsheet and PHP are affected?
One of my tests failed after I updated from 1.18 to 1.19. Version 1.21 is also affected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels