From 5bb5dd96231da4b61fc2f03480fb84acb389f66c Mon Sep 17 00:00:00 2001 From: dvinograd Date: Mon, 7 Nov 2016 13:05:52 +0100 Subject: [PATCH] Fix xml parser issue --- lib/internal/Magento/Framework/Xml/Parser.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/Xml/Parser.php b/lib/internal/Magento/Framework/Xml/Parser.php index 15d41d5d5427c..915cef2fbae06 100644 --- a/lib/internal/Magento/Framework/Xml/Parser.php +++ b/lib/internal/Magento/Framework/Xml/Parser.php @@ -111,7 +111,10 @@ protected function _xmlToArray($currentNode = false) $value = ['_value' => $value, '_attribute' => $attributes]; } if (isset($content[$node->nodeName])) { - if (!isset($content[$node->nodeName][0]) || !is_array($content[$node->nodeName][0])) { + if ( + (is_string($content[$node->nodeName]) || !isset($content[$node->nodeName][0])) + || (is_array($value) && !is_array($content[$node->nodeName][0])) + ) { $oldValue = $content[$node->nodeName]; $content[$node->nodeName] = []; $content[$node->nodeName][] = $oldValue;