Closed (fixed)
Project:
Project
Version:
x.y.z
Component:
Issues
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jan 2006 at 14:59 UTC
Updated:
7 Feb 2006 at 21:31 UTC
When trying to create a new issue the following error shows:
warning: array_merge() [function.array-merge]: Argument #2 is not an array in /data/wwwroot/hattrick.nethyperon.com/ho/modules/project/issue.inc on line 321.
warning: Invalid argument supplied for foreach() in /data/wwwroot/hattrick.nethyperon.com/ho/includes/form.inc on line 473.
The pulldown list of projects is empty.
I am using PHP5 so this might be the cause.
Comments
Comment #1
kong commentedI got the same error messages too. But I don't think it's because of PHP version.
If you take a look at the code, it looks like the errors are from project_projects_select_options().
It looks like the function tries to fetch the project name which has issues field = 1. But by default the issues field is set to 0 for newly created project. So the function cannot find any project with issues = 1 and it will return nothing to array-merge(), which expects to get an array as argument.
Comment #2
nethyperon commentedMethod is correct, but it has to do with the taxonomy module being enabled. If it's not, the error is gone.
Comment #3
dan_aka_jack commentedI also can't select a project from the drop down list. I submitted a bug report here:
http://drupal.org/node/44572
Perhaps both this current bug report and my bug report are both symptoms of this bug? :
http://drupal.org/node/38120
Thanks,
Jack
Comment #4
dan_aka_jack commentedHmm... that's interesting... but I (for one) absolutely require the taxonomy module. Disabling it is not an option.
Comment #5
markus_petrux commentedIn project.module find:
and after that add:
If for whatever reason no project is found in the DB, you at least can return an empty array, rather than null. The array_merge problem soved.
PS: Changed status, but no patch. The code suggestion is here. Want a patch? let me know. I just choose the quickest path for me atm. ;)
Comment #6
nedjoThanks, fix committed.
Comment #7
(not verified) commented