Skip to content

Commit

Permalink
Bugfix: Work Item PHPOfficeGH-290 - AdvancedValueBinder "Division by …
Browse files Browse the repository at this point in the history
…zero"-error
  • Loading branch information
Mark Baker committed Dec 31, 2013
1 parent 70892b9 commit 93b3b8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/PHPExcel/Cell/AdvancedValueBinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function bindValue(PHPExcel_Cell $cell, $value = null)
}

// Check for fraction
if (preg_match('/^([+-]?) *([0-9]*)\s?\/\s*([0-9]*)$/', $value, $matches)) {
if (preg_match('/^([+-]?)\s*([0-9]+)\s?\/\s*([0-9]+)$/', $value, $matches)) {
// Convert value to number
$value = $matches[2] / $matches[3];
if ($matches[1] == '-') $value = 0 - $value;
Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Fixed in develop branch for release v1.8.0:
- Bugfix: (Jazzo) Work Item GH-248 - Excel2007 does not correctly mark rows as hidden
- Bugfix: (Roy Shahbazian) Work Item GH-299 - Fixed typo in Chart/Layout set/getYMode()
- Bugfix: (EliuFlorez) Work item GH-279 - Fatal error: Call to a member function cellExists() line: 3327 in calculation.php if referenced worksheet doesn't exist
- Bugfix: (MBaker) Work Item GH-290 - AdvancedValueBinder "Division by zero"-error
- Feature: (amerov) - Implementation of the Excel HLOOKUP() function
- Feature: (MBaker) - Added "Quote Prefix" to style settings (Excel2007 Reader and Writer only)
- Feature: (MBaker) - Added Horizontal FILL alignment for Excel5 and Excel2007 Readers/Writers, and Horizontal DISTRIBUTED alignment for Excel2007 Reader/Writer
Expand Down

0 comments on commit 93b3b8e

Please sign in to comment.