diff --git a/src/PhpSpreadsheet/Reader/Xml.php b/src/PhpSpreadsheet/Reader/Xml.php index 0f40ddc7b3..18d744c94d 100644 --- a/src/PhpSpreadsheet/Reader/Xml.php +++ b/src/PhpSpreadsheet/Reader/Xml.php @@ -324,8 +324,8 @@ public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) $xml = $this->trySimpleXMLLoadString($pFilename); $namespaces = $xml->getNamespaces(true); - $namespacesDoc = $xml->getDocNamespaces(true); - $namespaces = array_merge($namespaces, $namespacesDoc); + $namespacesDoc = $xml->getDocNamespaces(true); + $namespaces = array_merge($namespaces, $namespacesDoc); $docProps = $spreadsheet->getProperties(); if (isset($xml->DocumentProperties[0])) {