Minor bugfix to calculation engine formula validation (unbalanced braces)

This commit is contained in:
Mark Baker 2012-10-13 22:07:36 +01:00
parent e46513043e
commit 7b8533a504
2 changed files with 4 additions and 1 deletions

View File

@ -2977,7 +2977,7 @@ class PHPExcel_Calculation {
} }
while (($op = $stack->pop()) !== NULL) { // pop everything off the stack and push onto output while (($op = $stack->pop()) !== NULL) { // pop everything off the stack and push onto output
if ((is_array($opCharacter) && $opCharacter['value'] == '(') || ($opCharacter === '(')) if ((is_array($op) && $op['value'] == '(') || ($op === '('))
return $this->_raiseFormulaError("Formula Error: Expecting ')'"); // if there are any opening braces on the stack, then braces were unbalanced return $this->_raiseFormulaError("Formula Error: Expecting ')'"); // if there are any opening braces on the stack, then braces were unbalanced
$output[] = $op; $output[] = $op;
} }

View File

@ -72,6 +72,9 @@ The following methods will be changed in version 1.7.9
Fixed in develop branch: Fixed in develop branch:
2012-10-12 (v1.7.8):
- Special: (kkamkou) Phar builder script to add phar file as a distribution option - Special: (kkamkou) Phar builder script to add phar file as a distribution option
- Feature: (MBaker) Refactor PDF Writer to allow use with a choice of PDF Rendering library - Feature: (MBaker) Refactor PDF Writer to allow use with a choice of PDF Rendering library
rather than restricting to tcPDF rather than restricting to tcPDF