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
An exception should be thrown for an invalid range, or maybe just the start cell should be returned.
What is the current behavior?
The program gets stuck in a loop and PHP runs out of memory.
I think the offending loop is \PhpOffice\PhpSpreadsheet\Cell\Coordinate line 372
while ($currentCol != $endCol) {
...
}
Probably needs a magnitude comparison rather than a straight equality comparison, since if an invalid range is given the current column will never equal the end column.
<?phprequire__DIR__ . '/vendor/autoload.php';
// Gets stuck in a loop
\PhpOffice\PhpSpreadsheet\Cell\Coordinate::extractAllCellReferencesInRange('Z1:A1');
// Which means the following gets stuck, causing a hard to debug memory error for// code that isn't necessarily obviously wrong.$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
$spreadsheet->getActiveSheet()
->mergeCellsByColumnAndRow(0, 1, 1, 1);
Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet 1.2
The text was updated successfully, but these errors were encountered:
This is:
What is the expected behavior?
An exception should be thrown for an invalid range, or maybe just the start cell should be returned.
What is the current behavior?
The program gets stuck in a loop and PHP runs out of memory.
I think the offending loop is \PhpOffice\PhpSpreadsheet\Cell\Coordinate line 372
Probably needs a magnitude comparison rather than a straight equality comparison, since if an invalid range is given the current column will never equal the end column.
What are the steps to reproduce?
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:
Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet 1.2
The text was updated successfully, but these errors were encountered: