mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-30 20:18:00 +00:00
Strings That Look Like Huge Floating Point Numbers
Fix #4776. DefaultValueBinder treats strings that look like scientific notation as floats. However, if Php evaluates them as `INF`, this can cause problems for Excel. A one-line change to DefaultValueBinder avoids this situation. Tests are added for DefaultValueBinder, and also for StringValueBinder and AdvancedValueBinder, although those extend DefaultValueBinder and needed no code changes.
This commit is contained in:
@@ -86,4 +86,7 @@ return [
|
||||
'Issue 1310 Multiple = at start' => ['s', '======'],
|
||||
'Issue 1310 Variant 1' => ['s', '= ====='],
|
||||
'Issue 1310 Variant 2' => ['s', '=2*3='],
|
||||
'Issue 4766 very large positive exponent treated as string' => ['s', '4E433'],
|
||||
'Issue 4766 very large negative exponent numeric' => ['n', '4E-433'],
|
||||
'Issue 4766 small exponent no decimal point numeric' => ['n', '4E4'],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user