Fix warning when reading xlsx without styles
Fixes https://github.com/PHPOffice/PHPExcel/issues/1134 Fixes #631
This commit is contained in:
parent
62f4b7c8cf
commit
bebfb1e41a
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Allow iterators to go out of bounds with prev - [#587](https://github.com/PHPOffice/PhpSpreadsheet/issues/587)
|
- Allow iterators to go out of bounds with prev - [#587](https://github.com/PHPOffice/PhpSpreadsheet/issues/587)
|
||||||
|
- Fix warning when reading xlsx without styles - [#631](https://github.com/PHPOffice/PhpSpreadsheet/pull/631)
|
||||||
|
|
||||||
## [1.4.0] - 2018-08-06
|
## [1.4.0] - 2018-08-06
|
||||||
|
|
||||||
|
|
|
@ -643,7 +643,7 @@ class Xlsx extends BaseReader
|
||||||
$excel->addCellXf($objStyle);
|
$excel->addCellXf($objStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($xmlStyles->cellStyleXfs->xf as $xf) {
|
foreach (isset($xmlStyles->cellStyleXfs->xf) ? $xmlStyles->cellStyleXfs->xf : [] as $xf) {
|
||||||
$numFmt = NumberFormat::FORMAT_GENERAL;
|
$numFmt = NumberFormat::FORMAT_GENERAL;
|
||||||
if ($numFmts && $xf['numFmtId']) {
|
if ($numFmts && $xf['numFmtId']) {
|
||||||
$tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]"));
|
$tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]"));
|
||||||
|
|
Loading…
Reference in New Issue