Reader/Gnumeric Failure with PHP8 (#1662)

* Reader/Gnumeric Failure with PHP8

An explicit cast from SimpleXML to int is now needed with PHP8,
where it was performed implicitly with PHP7.
Unit tests run correctly for both PHP7 and PHP8 on corrected code.
This commit is contained in:
oleibman 2020-10-01 03:38:36 -07:00 committed by GitHub
parent 43db94e94f
commit fe6221fe49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -543,7 +543,8 @@ class Gnumeric extends BaseReader
$endColumn = ($styleAttributes['endCol'] > $maxCol) ? $maxCol : (int) $styleAttributes['endCol']; $endColumn = ($styleAttributes['endCol'] > $maxCol) ? $maxCol : (int) $styleAttributes['endCol'];
$endColumn = Coordinate::stringFromColumnIndex($endColumn + 1); $endColumn = Coordinate::stringFromColumnIndex($endColumn + 1);
$endRow = 1 + (($styleAttributes['endRow'] > $maxRow) ? $maxRow : $styleAttributes['endRow']);
$endRow = 1 + (($styleAttributes['endRow'] > $maxRow) ? $maxRow : (int) $styleAttributes['endRow']);
$cellRange = $startColumn . $startRow . ':' . $endColumn . $endRow; $cellRange = $startColumn . $startRow . ':' . $endColumn . $endRow;
$styleAttributes = $styleRegion->Style->attributes(); $styleAttributes = $styleRegion->Style->attributes();