#52529Bug in GeneralUtility::array2xml
Description
It is possible to create XML with an empty key, if the array key is an empty string.
This must be checked in \TYPO3\CMS\Core\Utility\GeneralUtility::array2xml in line 260:
instead:
// Add the element to the output string:
$output .= ($spaceInd >= 0 ? str_pad('', ($level + 1) * $indentN, $indentChar) : '') . '<' . $NSprefix . $tagName . $attr . '>'
this must be:
// Add the element to the output string:
if((string)$tagName !== ''){
$output .= ($spaceInd >= 0 ? str_pad('', ($level + 1) * $indentN, $indentChar) : '') . '<' . $NSprefix . $tagName . $attr . '>' . $content . '</' . $NSprefix . $tagName . '>' . $nl;
}