From 3bea6f516b6a050d313fb4c71d3a1b9ba65aa15f Mon Sep 17 00:00:00 2001 From: Guillaume RODRIGUEZ Date: Mon, 29 Oct 2018 16:14:54 +0100 Subject: [PATCH] Fix index overflow on data values array Fix index overflow on data values array for multi level detection. Fixes #747 Fixes #748 --- CHANGELOG.md | 1 + src/PhpSpreadsheet/Chart/DataSeriesValues.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73beb51c..60f3ef63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/PhpSpreadsheet/Chart/DataSeriesValues.php b/src/PhpSpreadsheet/Chart/DataSeriesValues.php index fda6ccdf..1d660b0a 100644 --- a/src/PhpSpreadsheet/Chart/DataSeriesValues.php +++ b/src/PhpSpreadsheet/Chart/DataSeriesValues.php @@ -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;