Fix index overflow on data values array

Fix index overflow on data values array for multi level detection.

Fixes #747
Fixes #748
This commit is contained in:
Guillaume RODRIGUEZ 2018-10-29 16:14:54 +01:00 committed by Adrien Crivelli
parent e4ffeb4f0f
commit 3bea6f516b
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
2 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
- Fix print area parser for XLSX reader - [#734](https://github.com/PHPOffice/PhpSpreadsheet/pull/734)
- Support overriding `DefaultValueBinder::dataTypeForValue()` without overriding `DefaultValueBinder::bindValue()` - [#735](https://github.com/PHPOffice/PhpSpreadsheet/pull/735)
- Mpdf export can exceed pcre.backtrack_limit - [#637](https://github.com/PHPOffice/PhpSpreadsheet/issues/637)
- Fix index overflow on data values array - [#748](https://github.com/PHPOffice/PhpSpreadsheet/pull/748)
## [1.5.0] - 2018-10-21

View File

@ -271,7 +271,7 @@ class DataSeriesValues
public function isMultiLevelSeries()
{
if (count($this->dataValues) > 0) {
return is_array($this->dataValues[0]);
return is_array(array_values($this->dataValues)[0]);
}
return null;