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);
    }
CommentFileSizeAuthor
#4 2604174-1_fix.patch1.48 KBralphvdhoudt
#2 2604174_fix.patch650 bytesralphvdhoudt
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ralphvdhoudt created an issue. See original summary.

ralphvdhoudt’s picture

FileSize
650 bytes

Added a check to exclude if allready an array

MrHaroldA’s picture

Status: Active » Needs work

_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.

ralphvdhoudt’s picture

FileSize
1.48 KB

Look 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.

MrHaroldA’s picture

Status: Needs work » Reviewed & tested by the community

Tnx! Tested and committed as patch in the make file of the DvG distribution!

BarisW’s picture

Yes please. Can this be committed in this module?

pjcdawkins’s picture

Title: _wfm_process_submission error when data is allready an array » _wfm_process_submission error when data is already an array
Status: Reviewed & tested by the community » Fixed

Thanks everyone, it's nice to have a patch that solves a problem *and* removes dead code! Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.