From 29eca5f71fbb7f64d1f4120165adb7f3b4cbf7f0 Mon Sep 17 00:00:00 2001 From: Dave Umrysh Date: Wed, 21 Dec 2022 07:13:25 -0700 Subject: [PATCH] more PHP 8 changes --- PHPExcel/Calculation.php | 2 +- PHPExcel/ReferenceHelper.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PHPExcel/Calculation.php b/PHPExcel/Calculation.php index 072f69e..fe62d14 100644 --- a/PHPExcel/Calculation.php +++ b/PHPExcel/Calculation.php @@ -2955,7 +2955,7 @@ class PHPExcel_Calculation { // echo 'Element is a Variable, Constant, String, Number or Boolean
'; // If the last entry on the stack was a : operator, then we may have a row or column range reference $testPrevOp = $stack->last(1); - if ($testPrevOp['value'] == ':') { + if (isset($testPrevOp['value']) && $testPrevOp['value'] == ':') { $startRowColRef = $output[count($output)-1]['value']; $rangeWS1 = ''; if (strpos('!',$startRowColRef) !== FALSE) { diff --git a/PHPExcel/ReferenceHelper.php b/PHPExcel/ReferenceHelper.php index 402f2b4..f9fe4dc 100644 --- a/PHPExcel/ReferenceHelper.php +++ b/PHPExcel/ReferenceHelper.php @@ -889,9 +889,9 @@ class PHPExcel_ReferenceHelper list($newColumn, $newRow) = PHPExcel_Cell::coordinateFromString( $pCellReference ); // Verify which parts should be updated - $updateColumn = (($newColumn{0} != '$') && ($beforeColumn{0} != '$') && + $updateColumn = (($newColumn[0] != '$') && ($beforeColumn[0] != '$') && PHPExcel_Cell::columnIndexFromString($newColumn) >= PHPExcel_Cell::columnIndexFromString($beforeColumn)); - $updateRow = (($newRow{0} != '$') && ($beforeRow{0} != '$') && + $updateRow = (($newRow[0] != '$') && ($beforeRow[0] != '$') && $newRow >= $beforeRow); // Create new column reference