Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hey guys,
can you help me to fix that error?
array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #1 is not an array in /sites/all/modules/filefield/filefield_field.inc in line 292.
Thanks
Yannick
Comments
Comment #1
quicksketch#857938: Argument #2 is not an array in /sites/all/modules/filefield/filefield_widget.inc on line 255
Comment #2
quicksketchSorry I thought this was a duplicate, but looks like a slightly different error. Could you provide steps to recreate this problem from a fresh Drupal install? So far you're the only one that has reported this particular error.
Comment #3
yannickooI have not seen this error anymore. Can't reproduce this.
Comment #4
ccshannon CreditAttribution: ccshannon commentedI can.
The error occurs using Views. Some processes, in this case the module "flashvideo" - also I've seen it happen with images that are imported into a CCK Filefield table - do NOT fill in the "data" column in the Filefield table. Instead, the value of the data column is NULL.
When a View runs using a Filefield handler, on a row that has NULL in the data column, the View will crash (WSOD) in some cases, in other cases you will see a drupal error message with the array_merge error on line 292.
So, the value of $items[$delta]['data'] is NULL, but the code expects an array there, which throws an error, which is fatal most of the time (strangely not all of the time, which is a mystery to me).