Fix ODS Reader when no DC namespace are defined
ODS files without spreadsheet properties were triggering a fatal error Fixes #1047 Fixes #1176 Closes #1182
This commit is contained in:
parent
7e1bf823cc
commit
b20f5c1d11
|
@ -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
|
- 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)
|
- 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 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
|
## [1.9.0] - 2019-08-17
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,10 @@ class Properties
|
||||||
$officeProperty = $xml->children($namespacesMeta['office']);
|
$officeProperty = $xml->children($namespacesMeta['office']);
|
||||||
foreach ($officeProperty as $officePropertyData) {
|
foreach ($officeProperty as $officePropertyData) {
|
||||||
/** @var \SimpleXMLElement $officePropertyData */
|
/** @var \SimpleXMLElement $officePropertyData */
|
||||||
$officePropertiesDC = (object) [];
|
|
||||||
if (isset($namespacesMeta['dc'])) {
|
if (isset($namespacesMeta['dc'])) {
|
||||||
$officePropertiesDC = $officePropertyData->children($namespacesMeta['dc']);
|
$officePropertiesDC = $officePropertyData->children($namespacesMeta['dc']);
|
||||||
|
$this->setCoreProperties($docProps, $officePropertiesDC);
|
||||||
}
|
}
|
||||||
$this->setCoreProperties($docProps, $officePropertiesDC);
|
|
||||||
|
|
||||||
$officePropertyMeta = (object) [];
|
$officePropertyMeta = (object) [];
|
||||||
if (isset($namespacesMeta['dc'])) {
|
if (isset($namespacesMeta['dc'])) {
|
||||||
|
|
Loading…
Reference in New Issue