I'm not sure where to post this, but i get this error message when i use Filedepot, and it seems that something is not right with Filefield Meta.

warning: array_merge(): Argument #1 is not an array in C:\inetpub\wwwroot\site.net\public_html\sites\all\modules\filefield\filefield_meta\filefield_meta.module on line 78.

Can someone please explaine what the problem is?

CommentFileSizeAuthor
#1 filefield_meta_merge.patch615 bytesquicksketch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Title: Error message with Filedepot » Error message with FileField Meta/Filedepot
Version: 6.x-3.10 » 6.x-3.x-dev
Priority: Critical » Normal
FileSize
615 bytes

Seems like it's because Filedepot is saving blank rows into the "files" database table (at least based on #1809878: Field 'fid' doesn't have a default value). FileField Meta expects $file->data to be an array, but if it's an empty string, this error occurs. FileField Meta *does* accomodate for the value being entirely empty:

  $file->data = isset($file->data) ? $file->data : array();

But if it's set to an empty string, all kinds of things go wrong.

I've changed this line to be:

  $file->data = !empty($file->data) ? $file->data : array();

Which makes FileField Meta work in this situation, but the broader problem caused by FileDepot should be fixed separately.

quicksketch’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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