From 585f2fd9d5221cdbaa724698b48cd7b274f6bd41 Mon Sep 17 00:00:00 2001 From: KANE LAZENI Date: Sat, 3 Jan 2026 12:52:07 +0000 Subject: [PATCH] a --- PHPExcel/PHPExcel/Calculation.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PHPExcel/PHPExcel/Calculation.php b/PHPExcel/PHPExcel/Calculation.php index ee3c449..5c9fa4d 100755 --- a/PHPExcel/PHPExcel/Calculation.php +++ b/PHPExcel/PHPExcel/Calculation.php @@ -2758,7 +2758,7 @@ class PHPExcel_Calculation { // Loop through the formula extracting each operator and operand in turn while(TRUE) { //echo 'Assessing Expression '.substr($formula, $index),PHP_EOL; - $opCharacter = $formula{$index}; // Get the first character of the value at the current index position + $opCharacter = $formula[$index]; // Get the first character of the value at the current index position //echo 'Initial character of expression block is '.$opCharacter,PHP_EOL; if ((isset(self::$_comparisonOperators[$opCharacter])) && (strlen($formula) > $index) && (isset(self::$_comparisonOperators[$formula{$index+1}]))) { $opCharacter .= $formula{++$index}; @@ -3036,11 +3036,11 @@ class PHPExcel_Calculation { } } // Ignore white space - while (($formula{$index} == "\n") || ($formula{$index} == "\r")) { + while (($formula[$index] == "\n") || ($formula[$index] == "\r")) { ++$index; } - if ($formula{$index} == ' ') { - while ($formula{$index} == ' ') { + if ($formula[$index] == ' ') { + while ($formula[$index] == ' ') { ++$index; } // If we're expecting an operator, but only have a space between the previous and next operands (and both are