From 12388dd541d281867ce2e706dcb587834bef47a6 Mon Sep 17 00:00:00 2001 From: Janis Date: Mon, 22 May 2023 10:34:57 +0300 Subject: [PATCH] wip --- src/PhpSpreadsheet/Calculation/Calculation.php | 4 ++-- src/PhpSpreadsheet/Shared/StringHelper.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PhpSpreadsheet/Calculation/Calculation.php b/src/PhpSpreadsheet/Calculation/Calculation.php index 45a987e87b..f5790a1de6 100644 --- a/src/PhpSpreadsheet/Calculation/Calculation.php +++ b/src/PhpSpreadsheet/Calculation/Calculation.php @@ -4350,7 +4350,7 @@ private function processTokenStack($tokens, $cellID = null, ?Cell $pCell = null) } // if the token is a binary operator, pop the top two values off the stack, do the operation, and push the result back on the stack - if (isset(self::$binaryOperators[$token])) { + if (isset(self::$binaryOperators["$token"])) { // We must have two operands, error if we don't if (($operand2Data = $stack->pop()) === null) { return $this->raiseFormulaError('Internal error - Operand value missing from stack'); @@ -4897,7 +4897,7 @@ private function executeBinaryComparisonOperation($cellID, $operand1, $operand2, if (is_numeric($operand1) && is_numeric($operand2)) { $result = (abs($operand1 - $operand2) < $this->delta); } else { - $result = strcmp($operand1, $operand2) == 0; + $result = strcmp("$operand1", "$operand2") == 0; } break; diff --git a/src/PhpSpreadsheet/Shared/StringHelper.php b/src/PhpSpreadsheet/Shared/StringHelper.php index 3ddcf46473..912c3e0492 100644 --- a/src/PhpSpreadsheet/Shared/StringHelper.php +++ b/src/PhpSpreadsheet/Shared/StringHelper.php @@ -502,7 +502,7 @@ public static function strToUpper($pValue) */ public static function strToLower($pValue) { - return mb_convert_case($pValue, MB_CASE_LOWER, 'UTF-8'); + return mb_convert_case("$pValue", MB_CASE_LOWER, 'UTF-8'); } /**