Seeing this error: array_merge(): Argument #1 is not an array filefield_meta.module:78

Here's the diff:

@@ -73,7 +73,7 @@
  * Implementation of FileField's hook_file_insert().
  */
 function filefield_meta_file_insert(&$file) {
-  if (!empty($file->fid)) {
+  if (!empty($file->fid) && is_array($file->data)) {
     filefield_meta($file);
     $record = array_merge($file->data, array('fid' => $file->fid));
     drupal_write_record('filefield_meta', $record);

Comments

djbobbydrake’s picture

Issue summary: View changes

formatting

rgristroph’s picture

I tested this patch, and confirmed that the warning exists without it and went away with it.

--Rob

quicksketch’s picture

Status: Active » Fixed

Thanks, I fixed this with a similar approach in #1809872: Error message with FileField Meta/Filedepot.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

formatting