Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
JanisDavidsons committed May 22, 2023
1 parent d65f933 commit 12388dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/PhpSpreadsheet/Calculation/Calculation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Shared/StringHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/**
Expand Down

0 comments on commit 12388dd

Please sign in to comment.