Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Overview:
If a table element has child components that use zero as an option key (ex. 0|No 1|Yes), user-submitted data will contain zeroes whenever No is selected.
_table_emeent_validate()'s use of empty() causes these values to be converted to NULL, thus preventing the user-supplied zero value from being saved.
Fix:
foreach ($form_element[$child]['#all_children'] as $child) {
if (!isset($_POST[$child])) {
...
I would be happy to roll a patch for this if there's any indication that this module is actively maintained.
Comments