I got this message every time, I'm trying to add new component in a webform: (or just changing order of components ..)

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /sites/all/modules/webform_encrypt/webform_encrypt.module on line 45

Comments

Christofer’s picture

I get a similar message.

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/userB/database300/public_html/mywebpage.something/sites/all/modules/webform_encrypt/webform_encrypt.module on line 61.

And the worst thing is that some data i have added dissapears when I get the error

This need to be fixed, any suggestions?

Christofer’s picture

Seems to have solved the problem.

changed the line (61)
$component['extra'] = array_merge($component['extra'], $component['encryption']);
to
$component['extra'] = array_merge((array)$component['extra'], (array)$component['encryption']);

charlie-s’s picture

Works for me as well.

charlie-s’s picture

Title: warning » PHP Warning: array_merge() Argument #2 is not an array in webform_encrypt.module

Updating the title to be a little more helpful.

I should point out that the change from #2 also seems to have rectified the issue where occasional new form components (seemed to only be selects) had all of their options removed after they were initially added (same as experienced by stoffe).

theunraveler’s picture

Status: Active » Closed (duplicate)

This is a duplicate of #1344804: Add check for encryption options to webform_encrypt_webform_component_presave(), and has been fixed in the latest dev releases of both 7.x-1.x and 6.x-1.x. Thanks for the report.