Using filefield in content multigroup get this errors:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in filefield_widget() (line 328 of /home/szantogabor/public_html/felsofokon/sites/all/modules/filefield/filefield.module).
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in filefield_widget_value() (line 254 of /home/szantogabor/public_html/felsofokon/sites/all/modules/filefield/filefield_widget.inc)

Comments

szantog’s picture

Status: Active » Needs review
StatusFileSize
new549 bytes

and patch

nitebreed’s picture

patch is working +1
thnx!

3dloco’s picture

Thanks Szantog your patch #1 and the one at #1105342: unserialize bug leads to warning: array_merge(): Argument #2 is not an array got rid of the warning messages for me.

quicksketch’s picture

Status: Needs review » Closed (works as designed)

I'm sorry this patch seems entirely non-nonsensical:

-  if (isset($items[$delta])) {
+  if ($items[$delta]) {

How would this possibly help? The likely thing that would happen is that if $items[$delta] were NULL, it would then call array_merge() with a NULL argument (thus causing this exact error that you're trying to fix).

I'm going to focus on #857938: Argument #2 is not an array in /sites/all/modules/filefield/filefield_widget.inc on line 255 for fixing this error.