Ods reader fix for property reader when none set (#1064)

* Fix for Ods Property Reader when no core properties are defined

* Fix for Ods Property Reader when no meta properties are defined
This commit is contained in:
Mark Baker 2019-07-08 22:35:08 +02:00 committed by GitHub
parent d8047b071b
commit 094933164d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -20,13 +20,13 @@ class Properties
$officeProperty = $xml->children($namespacesMeta['office']);
foreach ($officeProperty as $officePropertyData) {
/** @var \SimpleXMLElement $officePropertyData */
$officePropertiesDC = [];
$officePropertiesDC = (object) [];
if (isset($namespacesMeta['dc'])) {
$officePropertiesDC = $officePropertyData->children($namespacesMeta['dc']);
}
$this->setCoreProperties($docProps, $officePropertiesDC);
$officePropertyMeta = [];
$officePropertyMeta = (object) [];
if (isset($namespacesMeta['dc'])) {
$officePropertyMeta = $officePropertyData->children($namespacesMeta['meta']);
}