summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Haug2011-04-27 17:14:00 -0600
committerNathan Haug2011-04-27 17:14:00 -0600
commit42c6ca6cd0ef000613f42204ddf6683aba3f1d1d (patch)
tree39391c5327d37891ab63ba7716a0551032eaafbe
parentff175660eed42e9bcc83a159ba6c8b8faaa9a261 (diff)
Issue #791118 by nonzero: warning: array_merge(): Argument #2 is not
an array.
-rw-r--r--filefield_field.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/filefield_field.inc b/filefield_field.inc
index 736e57e..2f8e607 100644
--- a/filefield_field.inc
+++ b/filefield_field.inc
@@ -135,7 +135,9 @@ function filefield_field_load($node, $field, &$items, $teaser, $page) {
$items[$delta] = NULL;
}
else {
- $item['data'] = unserialize($item['data']);
+ if (isset($item['data']) && !empty($item['data'])) {
+ $item['data'] = unserialize($item['data']);
+ }
// Temporary fix to unserialize data serialized multiple times.
// See the FileField issue http://drupal.org/node/402860.
// And the CCK issue http://drupal.org/node/407446.