diff --git a/lib/internal/Magento/Framework/Xml/Parser.php b/lib/internal/Magento/Framework/Xml/Parser.php index a25a50c4fba61..3cf4366b49c11 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;