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.
The code fails when data is allready an array
if (_wfm_is_multiple_recursive($components[$cid], $components)) {
$submission->data[$cid] = (array) _wfm_submission_data_to_string($data);
}
Comment | File | Size | Author |
---|---|---|---|
#4 | 2604174-1_fix.patch | 1.48 KB | ralphvdhoudt |
Comments
Comment #2
ralphvdhoudt CreditAttribution: ralphvdhoudt at ezCompany commentedAdded a check to exclude if allready an array
Comment #3
MrHaroldA CreditAttribution: MrHaroldA commented_wfm_submission_data_to_string() needs an array to function, so with your code, this function is never called?
It is indeed a strange function. The constructed string can't be reconstructed if it contains a serialized string to begin with.
Comment #4
ralphvdhoudt CreditAttribution: ralphvdhoudt at ezCompany commentedLook like the function is not needed for the module to work correctly. The usage of the function is unclear and fails when the value of the function contains an array. The patch removes the function and function call.
Comment #5
MrHaroldA CreditAttribution: MrHaroldA commentedTnx! Tested and committed as patch in the make file of the DvG distribution!
Comment #6
BarisW CreditAttribution: BarisW at LimoenGroen for Gemeente Venlo commentedYes please. Can this be committed in this module?
Comment #8
pjcdawkins CreditAttribution: pjcdawkins as a volunteer commentedThanks everyone, it's nice to have a patch that solves a problem *and* removes dead code! Committed.