[BUGFIX] Empty array not encoded as empty XML tag 99/44599/3
authorAndreas Wolf <dev@a-w.io>
Sat, 7 Nov 2015 13:55:47 +0000 (14:55 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 7 Nov 2015 15:33:08 +0000 (16:33 +0100)
commit9b4e2e5ed4020e54bf8fc397b7bb5b3f6b9e4dbd
tree725d3b82b8b2dad38937b58b16d32880a9c39426
parentdea3b005462500dc43e16cccfa56cf58cc52492e
[BUGFIX] Empty array not encoded as empty XML tag

When encoding an empty array, an empty line with indentation was
created. If the <el> tag had a proper type="array" attribute, it could
still be decoded to an array again. If not, it was decoded to a string,
leading to errors e.g. when trying to traverse it.

The fix is to include an empty element now, which will be decoded to
an empty array again then.

Change-Id: Ia78adc1e7e81a943cdbc94f3cfa19b36442c430f
Resolves: #71394
Releases: 6.2, master
Reviewed-on: https://review.typo3.org/44599
Reviewed-by: Juan Manuel Vergés Solanas <juanmanuel.vergessolanas@gmail.com>
Tested-by: Juan Manuel Vergés Solanas <juanmanuel.vergessolanas@gmail.com>
Reviewed-by: Hans Höchtl <jhoechtl@gmail.com>
Tested-by: Hans Höchtl <jhoechtl@gmail.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php