Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
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
Comment #1
perfectcu.be CreditAttribution: perfectcu.be commentedI 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()
Comment #2
oscarwerther CreditAttribution: oscarwerther commentedfix #1 works with filefield 6.x-3.11
thank you.
Comment #3
quicksketchThanks 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....