From 094933164d199f701cb307fa706d5916648d1733 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Mon, 8 Jul 2019 22:35:08 +0200 Subject: [PATCH] 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 --- src/PhpSpreadsheet/Reader/Ods/Properties.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PhpSpreadsheet/Reader/Ods/Properties.php b/src/PhpSpreadsheet/Reader/Ods/Properties.php index 85596b32..8b6122c5 100644 --- a/src/PhpSpreadsheet/Reader/Ods/Properties.php +++ b/src/PhpSpreadsheet/Reader/Ods/Properties.php @@ -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']); }