Bugfix: Work Item GH-290 - AdvancedValueBinder "Division by zero"-error

This commit is contained in:
Mark Baker 2013-12-31 01:13:06 +00:00
parent 70892b93c8
commit 93b3b8eed2
2 changed files with 2 additions and 1 deletions

View File

@ -80,7 +80,7 @@ class PHPExcel_Cell_AdvancedValueBinder extends PHPExcel_Cell_DefaultValueBinder
}
// 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;

View File

@ -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