I know this issue has come up before, and was fixed; however I'm running into it again after upgrading to 6.x-3.11. I've rolled back to 3.10 for now which has fixed the problem.
warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home7/springgl/public_html/sites/all/modules/filefield/filefield_field.inc on line 309.

Comments

perfectcu.be’s picture

I have recently run into and fixed this bug locally, also in version 6.x-3.11. The problem is that the second argument does not exist (NULL value) if there is nothing to merge. There is a check in place that the first argument exists, but none for the second. Thus if line 309 were changed from this:

309 <?php if (isset($file['data'])) { ?>

to this:

309 <?php if (isset($file['data']) && isset($items[$delta]['data'])) { ?>

the error would never occur again. This will not affect the expected results, simply remove the chance of error. I hope this is helpful in fixing this bug. This is also reported in issue #1321284: Array_merge(): argument #2 is not an array in filefield_field_sanitize()

oscarwerther’s picture

fix #1 works with filefield 6.x-3.11
thank you.

quicksketch’s picture

Issue summary: View changes
Priority: Major » Normal
Status: Active » Fixed

Thanks guys, I've committed perfectcu.be's suggestion and it'll be fixed in 3.12, which should come out tomorrow.

http://drupalcode.org/project/filefield.git/commitdiff/refs/heads/6.x-3....

Status: Fixed » Closed (fixed)

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