Skip to content

Commit

Permalink
Php 8.3 Problem - Add Casts to RowColumnInformation (#3641)
Browse files Browse the repository at this point in the history
Some tests were failing with Php nightly. Row values, which were expected to be int, were now being returned as string. Adding a couple of casts eliminated the problem in Php 8.3 without adverse effects in other releases.
  • Loading branch information
oleibman authored Jul 16, 2023
1 parent 8fd727d commit 3631777
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ public static function ROW($cellAddress = null, ?Cell $cell = null)
[, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
if (strpos($cellAddress, ':') !== false) {
[$startAddress, $endAddress] = explode(':', $cellAddress);
$startAddress = (string) preg_replace('/\D/', '', $startAddress);
$endAddress = (string) preg_replace('/\D/', '', $endAddress);
$startAddress = (int) (string) preg_replace('/\D/', '', $startAddress);
$endAddress = (int) (string) preg_replace('/\D/', '', $endAddress);

return array_map(
function ($value) {
Expand Down

0 comments on commit 3631777

Please sign in to comment.