parent
4e8e0dc01b
commit
79d86ef5cc
|
@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
|
|||
|
||||
- Support numeric condition in SUMIF, SUMIFS, AVERAGEIF, COUNTIF, MAXIF and MINIF - [#683](https://github.com/PHPOffice/PhpSpreadsheet/issues/683)
|
||||
- SUMIFS containing multiple conditions - [#704](https://github.com/PHPOffice/PhpSpreadsheet/issues/704)
|
||||
- Csv reader avoid notice when the file is empty - [#743](https://github.com/PHPOffice/PhpSpreadsheet/pull/743)
|
||||
|
||||
## [1.5.0] - 2018-10-21
|
||||
|
||||
|
|
|
@ -181,6 +181,13 @@ class Csv extends BaseReader
|
|||
}
|
||||
}
|
||||
|
||||
// If number of lines is 0, nothing to infer : fall back to the default
|
||||
if ($numberLines === 0) {
|
||||
$this->delimiter = reset($potentialDelimiters);
|
||||
|
||||
return $this->skipBOM();
|
||||
}
|
||||
|
||||
// Calculate the mean square deviations for each delimiter (ignoring delimiters that haven't been found consistently)
|
||||
$meanSquareDeviations = [];
|
||||
$middleIdx = floor(($numberLines - 1) / 2);
|
||||
|
|
|
@ -67,6 +67,18 @@ class CsvTest extends TestCase
|
|||
'D8',
|
||||
-58.373161,
|
||||
],
|
||||
[
|
||||
'data/Reader/CSV/empty.csv',
|
||||
',',
|
||||
'A1',
|
||||
null,
|
||||
],
|
||||
[
|
||||
'data/Reader/CSV/no_delimiter.csv',
|
||||
',',
|
||||
'A1',
|
||||
'SingleLine',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
SingleLine
|
|
Loading…
Reference in New Issue