warning: array_merge() [function.array-merge]: Argument #1 is not an array in /var/www/html/sites/all/modules/project/release/project_release.module on line 1013.

Line in question:
$form['#validate'] = array_merge($form['#validate'], array('project_release_project_edit_form_validate' => array()));

HOPEFULLY this is correct (I would love to have someone verify.)

Replace with:

$setting_valid = array('project_release_project_edit_form_validate' => array());
$form['#validate'] = isset($form['#validate']) ? array_merge($form['#validate'], $setting_valid) : $setting_valid;

Diff patch upload.

Comments

aclight’s picture

I'm getting the same error on my site. I didn't actually try to apply the patch, but I just made the changes manually. They did fix the problem.

AC

aclight’s picture

Title: warning: array_merge() [function.array-merge] » array_merge() error in project->edit->releases
Version: 5.x-0.1-beta » 5.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new919 bytes

The original submitter didn't mention where this error happens, but it's when you go to a project, select "edit" to edit the project's settings, and then click on "releases" sub-tab to edit project_release settings. I don't think the code that's causing this error is necessary in Drupal 5, since form validation is automatically sent through (in this case) the project_release_project_edit_form_validate() function.

The attached patch removes the offending line completely. I tested this on my site, and the project_release_project_edit_form_validate() function is at least called after submitting the form.

AC

dww’s picture

Status: Needs review » Fixed

Reviewed, tested, and committed #2 to HEAD and DRUPAL-4-7--2. Thanks, folks.

Anonymous’s picture

Status: Fixed » Closed (fixed)