Skip to content

Commit

Permalink
Binary operand validation fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
antonLytkin18 committed Oct 1, 2018
1 parent c4c199e commit a5e250b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/PhpSpreadsheet/Calculation/Calculation.php
Original file line number Diff line number Diff line change
Expand Up @@ -3835,6 +3835,9 @@ private function validateBinaryOperand(&$operand, &$stack)
if ($operand > '' && $operand[0] == '"') {
$operand = self::unwrapResult($operand);
}
if ($operand === '') {
return true;
}
// If the string is a numeric value, we treat it as a numeric, so no further testing
if (!is_numeric($operand)) {
// If not a numeric, test to see if the value is an Excel error, and so can't be used in normal binary operations
Expand Down

0 comments on commit a5e250b

Please sign in to comment.