diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a80d3ed..b7c2ceff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org). - Trying to remove a column that doesn't exist deletes the latest column - Keep big integer as integer instead of lossely casting to float [#874](https://github.com/PHPOffice/PhpSpreadsheet/pull/874) - Fix branch pruning handling of non boolean conditions [#1167](https://github.com/PHPOffice/PhpSpreadsheet/pull/1167) +- Fix ODS Reader when no DC namespace are defined [#1182](https://github.com/PHPOffice/PhpSpreadsheet/pull/1182) ## [1.9.0] - 2019-08-17 diff --git a/src/PhpSpreadsheet/Reader/Ods/Properties.php b/src/PhpSpreadsheet/Reader/Ods/Properties.php index 8b6122c5..4c87c2f5 100644 --- a/src/PhpSpreadsheet/Reader/Ods/Properties.php +++ b/src/PhpSpreadsheet/Reader/Ods/Properties.php @@ -20,11 +20,10 @@ class Properties $officeProperty = $xml->children($namespacesMeta['office']); foreach ($officeProperty as $officePropertyData) { /** @var \SimpleXMLElement $officePropertyData */ - $officePropertiesDC = (object) []; if (isset($namespacesMeta['dc'])) { $officePropertiesDC = $officePropertyData->children($namespacesMeta['dc']); + $this->setCoreProperties($docProps, $officePropertiesDC); } - $this->setCoreProperties($docProps, $officePropertiesDC); $officePropertyMeta = (object) []; if (isset($namespacesMeta['dc'])) {