Skip to content

ignoredErrors causing memory exhaustion #4375

Closed
@nbalena28

Description

@nbalena28

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)

What is the current behavior?
It is throwing an Allowed memory size of bytes exhausted exception

What are the steps to reproduce?
Here is an Excel file to reproduce this behavior with sample.xlsx

$reader = IOFactory::createReader('Xlsx');
$spreadsheet = $reader->load('sample.xlsx');

What features do you think are causing the issue

$sqref = (string) ($attributes['sqref'] ?? '');
$numberStoredAsText = (string) ($attributes['numberStoredAsText'] ?? '');
$formula = (string) ($attributes['formula'] ?? '');
$twoDigitTextYear = (string) ($attributes['twoDigitTextYear'] ?? '');
$evalError = (string) ($attributes['evalError'] ?? '');

Image

The processIgnoredErrors is iterating IT (254) upto 62680 rows

Does an issue affect all spreadsheet file formats? If not, which formats are affected?
At least xlsx

Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet 1.29.6 upto 4.0
PHP 7.4 | 8.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions