I get this error, i am using php 5.

Locatie	/index.php?q=node/add/webform
Bericht	array_merge() [function.array-merge]: Argument #2 is not an array in d:\www\stichtingbacu.nl\www\modules\webform\webform.module on line 280.

greetings

MM

Comments

ullgren’s picture

Could you please specify more exactly what steps lead up to this error ?

Mad Maks’s picture

-add/webform

- press Add then you get a new form.

- fill in the fileds and press done

- i get a new form with only a title and a alias field and a button preview

- pressing preview will lead to a enless circell (a preview form with only a preview button and no commit button)

The watchdox is showing the error

Thanks for looking into it

MM

ullgren’s picture

I can't recreate this problem.
The steps are
- add/webform
- press Add to add a new text field
- enter a name, description and width of the field
- press done.
Here I get the main webform-form again.
With both a preview and a submitt button.

Mad Maks’s picture

ullgren i use php 5, did you look into that. it might be the problem

ullgren’s picture

Could be.
I don't have access to any machine with PHP5 but I will do a change that might solve it and add the patch here for you to try. =/

stevryn’s picture

This error is common among modules using 4.6 and PHP 5. I have same problem, and also with subscriptions & a few other ones.

See this post for the subscriptions fix, perhaps that would help to find a fix for this one.

http://drupal.org/node/22849

ullgren’s picture

Assigned: Unassigned » ullgren

Fixed in CVS for 4.6

miles’s picture

I use webform-cvs and PHP 5.0.2. I have same problem.

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /data/domains/satortabor.hu/web/webroot/modules/webform/webform.module on line 280.

ullgren’s picture

Ok lets clarify

It is fixed in the _4.6.0_ branch of CVS. This branch is packaged as the 4.6.0 drop every day or so.
So you will want to get this file.
http://drupal.org/files/projects/webform-4.6.0.tar.gz

I haven't merged this changes into the CVS branch since I'm currently working with something else in this branch. This means that the -cvs.tar.gz file is NOT fixed yet. I will post a note here when I've done the merge.

I know this is (more than) a little confusing but it's the way the drupal project system works.

miles’s picture

Ok. I get http://drupal.org/files/projects/webform-4.6.0.tar.gz. The problem is the same. Not on line 280. On line 283. (Sorry for bad english :-[)

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /data/domains/satortabor.hu/web/webroot/modules/webform/webform.module on line 283.

ullgren’s picture

Ok ... sorry about that.
I've checked in a new patch it will be in the -4.6.0.tar.gz in a few hours.

miles’s picture

Thanks! And sorry. :-[ Here is the new error when the user post the form:

warning: array_merge() [function.array-merge]: Argument #1 is not an array in /data/domains/satortabor.hu/web/webroot/includes/menu.inc on line 351.

ullgren’s picture

OK,
Since it does not occure in webform I would say it is a problem in the core code.
However if it only occures after the user submits the form it is most likley due to a error in webform.
From error message I have problems finding out from where the call originated.

What page is displayed when the error occures ? Is it the webform or the confirmation message ?
What is the url field in your browser showing ?

miles’s picture

The displayed page is the confirmation massage.
The URL field: http://www.satortabor.hu/index.php?q=webform/done/45.

townxelliot’s picture

I got the same error (Argument #2 is not an array) using PHP 5, whether editing or updating a form. I got a blank page with half the fields missing, and no error or confirmation message, each time I submitted a new webform or added fields to an existing one. It seems to be caused when $old_edit is empty (and is not an array). So I just added some lines to set this variable to an empty array if $old_edit is empty:

if (!is_array($old_edit)) {
    $old_edit = array();
}

Sorry I haven't supplied this as a patch, but I'm having trouble keeping track of which versions people are using. I think I'm using an old CVS version, which may or may not be in sync with 4.6.

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)