[BUGFIX] Fix property mapping of checkbox arrays 85/21685/4
authorHelmut Hummel <helmut.hummel@typo3.org>
Thu, 27 Jun 2013 18:09:37 +0000 (20:09 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 28 Jun 2013 07:47:54 +0000 (09:47 +0200)
commit555ae7f27d71fbb307ecf9e4c73dd59eb5eb2c7a
tree1a20fd88f805601db3a299c46498f4a99a5a33cb
parent536857e31fe474e116e0f8b28e4be0567fe7fc33
[BUGFIX] Fix property mapping of checkbox arrays

If multiple checkboxes are rendered but none of it is
selected, an exception is thrown as the value of the hidden field,
that is submitted is a string.

This must be the case because we need to be able to clear out
selected checkboxes and cannot craft a hidden field that will
be translated to a GET/POST arument which is an empty array.

Because of that the ArrayConverter must be able to convert
empty strings to an empty array, just like the "old"
property mapper did.

Change-Id: I115831014caca4868d1f421eb968e01178e1169b
Resolves: #47832
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/21685
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/extbase/Classes/Property/TypeConverter/ArrayConverter.php
typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/ArrayConverterTest.php