[BUGFIX] CsvUtility method csvToArray does not handle enclosures right
When we have a csv string with enclosures, the string is sometimes not correctly transformed into a multidimensional array. The cause of this is the first str_getcsv() function, responsible for exploding the rows. It returns rows where the first column does not have an enclosure anymore. This patch fixes this by using fgetcsv(). A temporary file is created and written to the typo3temp folder and then passed to fgetcsv(). This way we get a correct multidimensional array from the csv string. Change-Id: I042c1ab326ef2b5f5cdd2b1455da76ccefd5ae36 Resolves: #68127 Releases: master Reviewed-on: http://review.typo3.org/41211 Reviewed-by:Sascha Egerer <sascha@sascha-egerer.de> Tested-by:
Sascha Egerer <sascha@sascha-egerer.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Patrick Broens <patrick@patrickbroens.nl> Tested-by:
Patrick Broens <patrick@patrickbroens.nl>
Showing
- typo3/sysext/core/Classes/Utility/CsvUtility.php 12 additions, 12 deletionstypo3/sysext/core/Classes/Utility/CsvUtility.php
- typo3/sysext/core/Tests/Unit/Utility/CsvUtilityTest.php 3 additions, 20 deletionstypo3/sysext/core/Tests/Unit/Utility/CsvUtilityTest.php
- typo3/sysext/frontend/Classes/DataProcessing/CommaSeparatedValueProcessor.php 0 additions, 4 deletions...d/Classes/DataProcessing/CommaSeparatedValueProcessor.php
Please register or sign in to comment