[BUGFIX] Trim input into xml2array 16/50716/2
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 20 Nov 2016 08:42:59 +0000 (09:42 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 20 Nov 2016 12:31:04 +0000 (13:31 +0100)
commit63a5383b16058ef2d60aa15062508571f368e1c6
tree906644f04460d9008aaf63b30949a096e6b5b9bd
parent966351c8ddb5860813f5dfe658774893b1cd477e
[BUGFIX] Trim input into xml2array

Preciding whitespace in the xml input string causes xml2array()
to fail with an error message. This whitespace is often
introduced by formatting code via IDE, so blaming the developer
only helps so far. Inserting a trim() before the input is processed
mitigates the problem.

Resolves: #78752
Releases: master, 7.6
Change-Id: I3b9d3c81b64d502e7cefef80e72bef3a1bd9b3da
Reviewed-on: https://review.typo3.org/50716
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Łukasz Uznański <l.uznanski@macopedia.pl>
Tested-by: Łukasz Uznański <l.uznanski@macopedia.pl>
Reviewed-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php